Skip to content

Commit 2b2a1c8

Browse files
committed
fixing sqlite tests - continued
1 parent 154c86c commit 2b2a1c8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/base.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,14 @@ def insert_many_rows(self, row_count=10000):
153153
self.run_sync(f"INSERT INTO manager (name) VALUES {values_string};")
154154

155155
def drop_table(self):
156-
self.run_sync("DROP TABLE IF EXISTS band CASCADE;")
157-
self.run_sync("DROP TABLE IF EXISTS manager CASCADE;")
158-
self.run_sync("DROP TABLE IF EXISTS ticket CASCADE;")
156+
if ENGINE.engine_type == "postgres":
157+
self.run_sync("DROP TABLE IF EXISTS band CASCADE;")
158+
self.run_sync("DROP TABLE IF EXISTS manager CASCADE;")
159+
self.run_sync("DROP TABLE IF EXISTS ticket CASCADE;")
160+
elif ENGINE.engine_type == "sqlite":
161+
self.run_sync("DROP TABLE IF EXISTS band;")
162+
self.run_sync("DROP TABLE IF EXISTS manager;")
163+
self.run_sync("DROP TABLE IF EXISTS ticket;")
159164

160165
def setUp(self):
161166
self.create_table()

0 commit comments

Comments
 (0)