server/test/unittest_migractions.py
changeset 4763 81b0df087375
parent 4691 ae468fae9965
child 4774 89a7555020ba
--- a/server/test/unittest_migractions.py	Wed Mar 03 17:51:49 2010 +0100
+++ b/server/test/unittest_migractions.py	Wed Mar 03 17:56:04 2010 +0100
@@ -35,6 +35,13 @@
     def _refresh_repo(cls):
         super(MigrationCommandsTC, cls)._refresh_repo()
         cls.repo.set_schema(deepcopy(cls.origschema), resetvreg=False)
+        # reset migration schema eids
+        for eschema in migrschema.entities():
+            eschema.eid = None
+        for rschema in migrschema.relations():
+            rschema.eid = None
+            for rdef in rschema.rdefs.values():
+                rdef.eid = None
 
     def setUp(self):
         CubicWebTC.setUp(self)
@@ -44,7 +51,6 @@
         assert self.cnx is self.mh._cnx
         assert self.session is self.mh.session, (self.session.id, self.mh.session.id)
 
-
     def test_add_attribute_int(self):
         self.failIf('whatever' in self.schema)
         self.request().create_entity('Note')