dataimport/test/test_massive_store.py
changeset 10869 575982c948a9
parent 10868 ffb5b6c25cec
child 10872 ff4f94cfa2fb
--- a/dataimport/test/test_massive_store.py	Wed Nov 04 09:22:35 2015 +0100
+++ b/dataimport/test/test_massive_store.py	Mon Nov 09 15:22:43 2015 +0100
@@ -127,21 +127,9 @@
                                       'T name TN')[0]
             self.assertEqual(cnx.entity_from_eid(eid).cw_etype, etname)
 
-    def test_do_not_drop_index(self):
-        with self.admin_access.repo_cnx() as cnx:
-            store = MassiveObjectStore(cnx, drop_index=False)
-            cnx.commit()
-        with self.admin_access.repo_cnx() as cnx:
-            crs = cnx.system_sql('SELECT indexname FROM pg_indexes')
-            indexes = [r[0] for r in crs.fetchall()]
-        self.assertIn('entities_pkey', indexes)
-        self.assertIn('unique_entities_extid_idx', indexes)
-        self.assertIn('owned_by_relation_p_key', indexes)
-        self.assertIn('owned_by_relation_to_idx', indexes)
-
     def test_drop_index(self):
         with self.admin_access.repo_cnx() as cnx:
-            store = MassiveObjectStore(cnx, drop_index=True)
+            store = MassiveObjectStore(cnx)
             cnx.commit()
         with self.admin_access.repo_cnx() as cnx:
             crs = cnx.system_sql('SELECT indexname FROM pg_indexes')
@@ -153,7 +141,7 @@
 
     def test_drop_index_recreation(self):
         with self.admin_access.repo_cnx() as cnx:
-            store = MassiveObjectStore(cnx, drop_index=True)
+            store = MassiveObjectStore(cnx)
             store.finish()
             cnx.commit()
         with self.admin_access.repo_cnx() as cnx:
@@ -292,39 +280,6 @@
             store.init_relation_table('used_language')
             store.finish()
 
-    def test_multiple_insert_drop_index(self):
-        with self.admin_access.repo_cnx() as cnx:
-            store = MassiveObjectStore(cnx, drop_index=False)
-            store.init_relation_table('used_language')
-            store.init_etype_table('TestLocation')
-            store.finish()
-            store = MassiveObjectStore(cnx)
-            store.init_relation_table('used_language')
-            store.init_etype_table('TestLocation')
-            store.finish()
-
-    def test_multiple_insert_drop_index_2(self):
-        with self.admin_access.repo_cnx() as cnx:
-            store = MassiveObjectStore(cnx)
-            store.init_relation_table('used_language')
-            store.init_etype_table('TestLocation')
-            store.finish()
-            store = MassiveObjectStore(cnx, drop_index=False)
-            store.init_relation_table('used_language')
-            store.init_etype_table('TestLocation')
-            store.finish()
-
-    def test_multiple_insert_drop_index_3(self):
-        with self.admin_access.repo_cnx() as cnx:
-            store = MassiveObjectStore(cnx, drop_index=False)
-            store.init_relation_table('used_language')
-            store.init_etype_table('TestLocation')
-            store.finish()
-            store = MassiveObjectStore(cnx, drop_index=False)
-            store.init_relation_table('used_language')
-            store.init_etype_table('TestLocation')
-            store.finish()
-
 
 if __name__ == '__main__':
     from logilab.common.testlib import unittest_main