aboutsummaryrefslogtreecommitdiff
path: root/tests/models/gr/test_base.py
diff options
context:
space:
mode:
authorMax Nanis2026-08-21 17:19:41 -0700
committerMax Nanis2026-08-21 17:19:41 -0700
commit6cf7ccbaa8306700e64ada19d6f99807743b2865 (patch)
tree16ccde36ba2694b8c03bf8bdcee9cfcb2909046a /tests/models/gr/test_base.py
parent352520a2bd4ac066e90587e44d8b818043407917 (diff)
downloadgeneralresearch-6cf7ccbaa8306700e64ada19d6f99807743b2865.tar.gz
generalresearch-6cf7ccbaa8306700e64ada19d6f99807743b2865.zip
Ruff auto updates to 3.14
Diffstat (limited to 'tests/models/gr/test_base.py')
-rw-r--r--tests/models/gr/test_base.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/tests/models/gr/test_base.py b/tests/models/gr/test_base.py
index a9f01a8..8da28d3 100644
--- a/tests/models/gr/test_base.py
+++ b/tests/models/gr/test_base.py
@@ -1,6 +1,6 @@
import subprocess
+from collections.abc import Callable
from pathlib import Path
-from typing import Callable
import pytest
from pydantic import PostgresDsn
@@ -10,9 +10,11 @@ from generalresearch.pg_helper import PostgresConfig
class TestGRPostgresDjangoCreation:
- def test_git(self, git_key_path: Path, gr_repo: Callable[..., Path]):
+ def test_git(self, gr_repo: Callable[..., Path]):
repo_path = gr_repo()
+ print("test_git.PATH:", repo_path)
+
try:
# Run the git command inside the target directory
result = subprocess.run(
@@ -36,11 +38,13 @@ class TestGRPostgresDjangoCreation:
dsn = django_db_factory("gr")
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
+ def test_django_tables(self, gr_db: PostgresConfig):
+ res = gr_db.execute_sql_query(query="""
+ SELECT COUNT(*)
+ FROM information_schema.tables
+ WHERE table_schema = 'public';
+ """)
+ print(res)
+ assert len(res) == 1
+ assert res[0]["count"] == 56
+ assert True