From 05102628a7dc85a5a19a32415a7ec41ea7a91812 Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Fri, 21 Aug 2026 01:38:27 -0700 Subject: moving create_dummy, organizing test_utils, working on django config for any repos --- tests/models/gr/test_base.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/models/gr/test_base.py (limited to 'tests/models/gr/test_base.py') 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 -- cgit v1.2.3