equal
deleted
inserted
replaced
293 def test_required_change_2(self): |
293 def test_required_change_2(self): |
294 with self.admin_access.repo_cnx() as cnx: |
294 with self.admin_access.repo_cnx() as cnx: |
295 cnx.execute('SET DEF cardinality "11" ' |
295 cnx.execute('SET DEF cardinality "11" ' |
296 'WHERE DEF relation_type RT, DEF from_entity E,' |
296 'WHERE DEF relation_type RT, DEF from_entity E,' |
297 'RT name "surname", E name "CWUser"') |
297 'RT name "surname", E name "CWUser"') |
|
298 cnx.execute('SET U surname "Doe" WHERE U surname NULL') |
298 cnx.commit() |
299 cnx.commit() |
299 # should not be able anymore to add cwuser without surname |
300 # should not be able anymore to add cwuser without surname |
300 self.assertRaises(ValidationError, self.create_user, cnx, "toto") |
301 self.assertRaises(ValidationError, self.create_user, cnx, "toto") |
301 cnx.rollback() |
302 cnx.rollback() |
302 cnx.execute('SET DEF cardinality "?1" ' |
303 cnx.execute('SET DEF cardinality "?1" ' |