aboutsummaryrefslogtreecommitdiff
path: root/tests/models/gr/test_base.py
diff options
context:
space:
mode:
authorMax Nanis2026-08-21 01:38:27 -0700
committerMax Nanis2026-08-21 01:38:27 -0700
commit05102628a7dc85a5a19a32415a7ec41ea7a91812 (patch)
treef5253ad2f57a9f05776eaf8f5dfb21bedbd08c7e /tests/models/gr/test_base.py
parent0c10237223829818752ab4fc431957c0b22a0e23 (diff)
downloadgeneralresearch-05102628a7dc85a5a19a32415a7ec41ea7a91812.tar.gz
generalresearch-05102628a7dc85a5a19a32415a7ec41ea7a91812.zip
moving create_dummy, organizing test_utils, working on django config for any repos
Diffstat (limited to 'tests/models/gr/test_base.py')
-rw-r--r--tests/models/gr/test_base.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/models/gr/test_base.py b/tests/models/gr/test_base.py
new file mode 100644
index 0000000..323d7b6
--- /dev/null
+++ b/tests/models/gr/test_base.py
@@ -0,0 +1,25 @@
+from typing import Callable
+
+from pydantic import PostgresDsn
+
+from generalresearch.pg_helper import PostgresConfig
+
+
+class TestGRPostgresDjangoCreation:
+
+ def test_django_creation(
+ self,
+ django_db_factory: Callable[..., None],
+ ):
+
+ dsn = django_db_factory("gr_carer")
+ assert isinstance(dsn, PostgresDsn)
+
+ def test_django_tables(self, thl_web_rw: PostgresConfig):
+ res = thl_web_rw.execute_sql_query(query="""
+ SELECT COUNT(*)
+ FROM information_schema.tables
+ WHERE table_schema = 'public';
+ """)
+ assert len(res) == 1
+ assert res[0]["count"] == 56