From 2d2a4cdfb13c8ded9d6918a311454e1e955d709c Mon Sep 17 00:00:00 2001 From: Jiri Kozel Date: Tue, 17 Jan 2023 15:58:59 +0100 Subject: [PATCH] Always create external test DB --- test_tools/external_db.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test_tools/external_db.py b/test_tools/external_db.py index 108c11ace..48f80655c 100644 --- a/test_tools/external_db.py +++ b/test_tools/external_db.py @@ -8,13 +8,10 @@ @pytest.fixture(scope="session") def ensure_db(): - query = f"SELECT count(*) FROM pg_database WHERE datname = %s" statement = f"""CREATE DATABASE {EXTERNAL_DB_NAME} TEMPLATE {settings.LAYMAN_PG_TEMPLATE_DBNAME}""" with app.app_context(): - res = db_util.run_query(query, (EXTERNAL_DB_NAME,)) - if not res[0][0] == 1: - db_util.run_statement(statement) + db_util.run_statement(statement) yield