diff options
author | Darik Gamble <darik.gamble@gmail.com> | 2015-01-18 18:27:25 -0500 |
---|---|---|
committer | Darik Gamble <darik.gamble@gmail.com> | 2015-01-18 18:27:25 -0500 |
commit | cc6276925fdb81293479c9decd07c114bd0a622d (patch) | |
tree | 057852c94688bd84aa408ddae47fc38fac1d343d /tests/utils.py | |
parent | 78dce17428aaae9e3f578f275330a6d432c81fd9 (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.py | 6 |
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): |