cubicweb/hooks/test/unittest_syncschema.py
changeset 11341 bd3cd3691ade
parent 11057 0b59724cb3f2
child 11358 179b5ff3f428
--- a/cubicweb/hooks/test/unittest_syncschema.py	Wed Jun 22 11:01:16 2016 +0200
+++ b/cubicweb/hooks/test/unittest_syncschema.py	Tue Jun 21 18:11:40 2016 +0200
@@ -398,7 +398,9 @@
                         'EDEF constrained_by X WHERE CT name %(ct)s, EDEF eid %(x)s',
                         {'ct': cstr3.__class__.__name__, 'v': cstr3.serialize(), 'x': rdef.eid})
             cnx.commit()
-            self.assertCountEqual(rdef.constraints, [cstr, cstr3])
+            # Do not use assertCountEqual as it does "strange" equality
+            # comparison on Python 2.
+            self.assertEqual(set(rdef.constraints), set([cstr, cstr3]))
 
 
 if __name__ == '__main__':