[test] repair test: we now have another unique constraint on CWSourceHostConfig
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 25 Oct 2010 17:15:53 +0200
changeset 6635 4e560631f36d
parent 6634 0683748bca81
child 6636 dbc9cce53c11
[test] repair test: we now have another unique constraint on CWSourceHostConfig
server/test/unittest_migractions.py
--- a/server/test/unittest_migractions.py	Mon Oct 25 17:15:52 2010 +0200
+++ b/server/test/unittest_migractions.py	Mon Oct 25 17:15:53 2010 +0200
@@ -414,7 +414,7 @@
         self.assertEqual(len(self.schema.eschema('Personne')._unique_together), 1)
         self.assertItemsEqual(self.schema.eschema('Personne')._unique_together[0],
                                            ('nom', 'prenom', 'datenaiss'))
-        rset = cursor.execute('Any C WHERE C is CWUniqueTogetherConstraint')
+        rset = cursor.execute('Any C WHERE C is CWUniqueTogetherConstraint, C constraint_of ET, ET name "Personne"')
         self.assertEqual(len(rset), 1)
         relations = [r.rtype.name for r in rset.get_entity(0, 0).relations]
         self.assertItemsEqual(relations, ('nom', 'prenom', 'datenaiss'))