# HG changeset patch # User Julien Cristau # Date 1431972006 -7200 # Node ID 6493c8bf521d31567311674e247b49b720552d72 # Parent 5b33ca2c61e04a7cc42c837da877a0caab9cce20 [test] don't leave NULL columns around when making an attribute required It doesn't matter on sqlite (it doesn't do ALTER COLUMN), but when running this test on postgresql it fails to add the 'NOT NULL' constraint otherwise. diff -r 5b33ca2c61e0 -r 6493c8bf521d hooks/test/unittest_syncschema.py --- a/hooks/test/unittest_syncschema.py Tue Jun 23 10:02:41 2015 +0200 +++ b/hooks/test/unittest_syncschema.py Mon May 18 20:00:06 2015 +0200 @@ -295,6 +295,7 @@ cnx.execute('SET DEF cardinality "11" ' 'WHERE DEF relation_type RT, DEF from_entity E,' 'RT name "surname", E name "CWUser"') + cnx.execute('SET U surname "Doe" WHERE U surname NULL') cnx.commit() # should not be able anymore to add cwuser without surname self.assertRaises(ValidationError, self.create_user, cnx, "toto")