hooks/test/unittest_syncschema.py
changeset 10436 6493c8bf521d
parent 10365 21461f80f348
child 10442 b2d2099dfae8
equal deleted inserted replaced
10435:5b33ca2c61e0 10436:6493c8bf521d
   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" '