aboutsummaryrefslogtreecommitdiff
path: root/tests/test_postgres.py
diff options
context:
space:
mode:
authorMax Nanis2026-09-10 11:17:07 -0700
committerMax Nanis2026-09-10 11:17:07 -0700
commit26167c923448fae157f5134350e771928ad09b0b (patch)
tree7c0442b82edce6370007e3a604e36d7c395d5987 /tests/test_postgres.py
parentbbc373bd2e9617c8da829b3a180e9c42f139a380 (diff)
downloadamt-jb-26167c923448fae157f5134350e771928ad09b0b.tar.gz
amt-jb-26167c923448fae157f5134350e771928ad09b0b.zip
basic tests should be working. Jenkins p1
Diffstat (limited to 'tests/test_postgres.py')
-rw-r--r--tests/test_postgres.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_postgres.py b/tests/test_postgres.py
index 6db4f82..244c132 100644
--- a/tests/test_postgres.py
+++ b/tests/test_postgres.py
@@ -51,3 +51,19 @@ class TestPostgresDjangoCreation:
def test_ping(self, postgres_instance_dict: PostgresDict):
assert can_ping(host=postgres_instance_dict["host"])
+
+ def test_django_creation(
+ self,
+ django_db_factory: Callable[..., None],
+ ):
+ dsn = django_db_factory()
+ assert isinstance(dsn, PostgresDsn)
+
+ def test_django_tables(self, pg_config: PostgresConfig):
+ res = pg_config.execute_sql_query(query="""
+ SELECT COUNT(*)
+ FROM information_schema.tables
+ WHERE table_schema = 'public';
+ """)
+ assert len(res) == 1
+ assert res[0]["count"] == 7