cubicweb/server/test/unittest_migractions.py
changeset 12512 661dd0436c01
parent 12239 19aae64c4010
child 12545 be36811f0d08
--- a/cubicweb/server/test/unittest_migractions.py	Wed Mar 13 10:21:39 2019 +0100
+++ b/cubicweb/server/test/unittest_migractions.py	Mon Mar 11 17:43:23 2019 +0100
@@ -31,6 +31,7 @@
                       ExecutionError, Binary)
 from cubicweb.devtools import startpgcluster, stoppgcluster
 from cubicweb.devtools.testlib import CubicWebTC, TemporaryDirectory
+from cubicweb.schema import constraint_name_for
 from cubicweb.server.sqlutils import SQL_PREFIX
 from cubicweb.server.migractions import ServerMigrationHelper
 from cubicweb.server.sources import storages
@@ -616,7 +617,7 @@
             self.assertEqual(len(constraints), 1, constraints)
             rdef = migrschema['promo'].rdefs['Personne', 'String']
             cstr = rdef.constraint_by_type('StaticVocabularyConstraint')
-            self.assertIn(cstr.name_for(rdef), constraints)
+            self.assertIn(constraint_name_for(cstr, rdef), constraints)
 
     def _erqlexpr_rset(self, cnx, action, ertype):
         rql = 'RQLExpression X WHERE ET is CWEType, ET %s_permission X, ET name %%(name)s' % action