diff options
Diffstat (limited to 'tests/test_postgres.py')
| -rw-r--r-- | tests/test_postgres.py | 16 |
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 |
