dataimport/test/test_massive_store.py
changeset 11028 66f94d7f9ca7
parent 11026 ce9b3886955d
--- a/dataimport/test/test_massive_store.py	Wed Dec 02 15:20:52 2015 +0100
+++ b/dataimport/test/test_massive_store.py	Wed Dec 02 15:24:03 2015 +0100
@@ -130,11 +130,8 @@
         self.assertIn('owned_by_relation_to_idx', indexes)
 
     def test_eids_seq_range(self):
-        class MyMassiveObjectStore(MassiveObjectStore):
-            eids_seq_range = 1000
-
         with self.admin_access.repo_cnx() as cnx:
-            store = MyMassiveObjectStore(cnx)
+            store = MassiveObjectStore(cnx, eids_seq_range=1000)
             store.restart_eid_sequence(50000)
             store.prepare_insert_entity('Location', name=u'toto')
             store.flush()
@@ -144,11 +141,8 @@
             self.assertGreater(crs.fetchone()[0], 50000)
 
     def test_eid_entity(self):
-        class MyMassiveObjectStore(MassiveObjectStore):
-            eids_seq_range = 1000
-
         with self.admin_access.repo_cnx() as cnx:
-            store = MyMassiveObjectStore(cnx)
+            store = MassiveObjectStore(cnx, eids_seq_range=1000)
             store.restart_eid_sequence(50000)
             eid = store.prepare_insert_entity('Location', name=u'toto')
             store.flush()