summaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
authorDarik Gamble <darik.gamble@gmail.com>2015-01-18 18:27:25 -0500
committerDarik Gamble <darik.gamble@gmail.com>2015-01-18 18:27:25 -0500
commitcc6276925fdb81293479c9decd07c114bd0a622d (patch)
tree057852c94688bd84aa408ddae47fc38fac1d343d /tests/utils.py
parent78dce17428aaae9e3f578f275330a6d432c81fd9 (diff)
Get schema names with a direct query instead of stripping them from the tables metadata so we can autocomplete schemata without tables in them
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 648ca3d9..91093dec 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -32,7 +32,11 @@ def create_db(dbname):
def drop_tables(conn):
with conn.cursor() as cur:
- cur.execute('''DROP SCHEMA public CASCADE; CREATE SCHEMA public''')
+ cur.execute('''
+ DROP SCHEMA public CASCADE;
+ CREATE SCHEMA public;
+ DROP SCHEMA IF EXISTS schema1 CASCADE;
+ DROP SCHEMA IF EXISTS schema2 CASCADE''')
def run(executor, sql, join=False):