[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.
--- 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")