hooks/test/unittest_syncschema.py
brancholdstable
changeset 7078 bad26a22fe29
parent 6781 5062d86d6ffe
child 7244 a918f76441ce
--- a/hooks/test/unittest_syncschema.py	Fri Mar 11 09:46:45 2011 +0100
+++ b/hooks/test/unittest_syncschema.py	Tue Dec 07 12:18:20 2010 +0100
@@ -30,18 +30,10 @@
 class SchemaModificationHooksTC(CubicWebTC):
     reset_schema = True
 
-    @classmethod
-    def init_config(cls, config):
-        super(SchemaModificationHooksTC, cls).init_config(config)
-        # we have to read schema from the database to get eid for schema entities
-        config._cubes = None
-        cls.repo.fill_schema()
-        cls.schema_eids = schema_eids_idx(cls.repo.schema)
-
-    @classmethod
-    def _refresh_repo(cls):
-        super(SchemaModificationHooksTC, cls)._refresh_repo()
-        restore_schema_eids_idx(cls.repo.schema, cls.schema_eids)
+    def setUp(self):
+        super(SchemaModificationHooksTC, self).setUp()
+        self.repo.fill_schema()
+        self.__class__.schema_eids = schema_eids_idx(self.repo.schema)
 
     def index_exists(self, etype, attr, unique=False):
         self.session.set_pool()