aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_postgres.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/test_postgres.py b/tests/test_postgres.py
index 9794321..de3f5d8 100644
--- a/tests/test_postgres.py
+++ b/tests/test_postgres.py
@@ -70,13 +70,30 @@ class TestPostgresDjangoCreation:
assert len(res) == 1
assert res[0]["count"] == 57
+ def test_django_tables_only_gr(self, gr_db: PostgresConfig):
+ """
+ IMPORTANT: This can't really run with only the GR tables,
+ that's because we have most of the database init fixtures
+ as session scoped; and we can't ensure that this will
+ run before any test that depends on the core thl
+ migrations
+ """
+
+ res = gr_db.execute_sql_query(query="""
+ SELECT COUNT(*)
+ FROM information_schema.tables
+ WHERE table_schema = 'public';
+ """)
+ assert len(res) == 1
+ assert res[0]["count"] == 65
+
def test_django_tables_with_gr(
self, thl_web_rw: PostgresConfig, gr_db: PostgresConfig
):
res = thl_web_rw.execute_sql_query(query="""
- SELECT COUNT(*)
+ SELECT COUNT(*)
FROM information_schema.tables
WHERE table_schema = 'public';
""")
assert len(res) == 1
- assert res[0]["count"] > 57
+ assert res[0]["count"] == 65