aboutsummaryrefslogtreecommitdiff
path: root/tests/models/gr
diff options
context:
space:
mode:
authorGreg Stupp2026-10-13 22:36:37 +0000
committerGreg Stupp2026-10-13 22:36:37 +0000
commitaad04d47a507cdec4ceabd3d978dd1a08ad28234 (patch)
tree942e5e1266aefe3b0f86a107f122de7540f75cf5 /tests/models/gr
parentc265cc29d7a864651377c94be8695c9cf9b79bf1 (diff)
parente5ba13edd8afa10330ad8e6e67fa1c023263345c (diff)
downloadgeneralresearch-3.8.1.tar.gz
generalresearch-3.8.1.zip
Merges pull request #10 v3.8.1
Fix BusinessCreate and Fix pytest fixtures for gr
Diffstat (limited to 'tests/models/gr')
-rw-r--r--tests/models/gr/test_base.py33
1 files changed, 2 insertions, 31 deletions
diff --git a/tests/models/gr/test_base.py b/tests/models/gr/test_base.py
index 5ab5dff..d312501 100644
--- a/tests/models/gr/test_base.py
+++ b/tests/models/gr/test_base.py
@@ -1,41 +1,12 @@
-from __future__ import annotations
-
-import subprocess
from collections.abc import Callable
-from pathlib import Path
-from typing import TYPE_CHECKING
-import pytest
from pydantic import PostgresDsn
-if TYPE_CHECKING:
- from generalresearch.pg_helper import PostgresConfig
-
class TestGRPostgresDjangoCreation:
-
- def test_git(self, gr_repo: Callable[..., Path]):
- repo_path = gr_repo()
-
- try:
- # Run the git command inside the target directory
- result = subprocess.run(
- ["git", "rev-parse", "--is-inside-work-tree"],
- cwd=repo_path,
- capture_output=True,
- text=True,
- check=True,
- )
- # Check if the output string is exactly "true"
- assert result.stdout.strip() == "true"
-
- except (subprocess.CalledProcessError, FileNotFoundError) as e:
- pytest.fail(f"Directory is not a Git repo or Git is not installed: {e}")
-
def test_django_creation(
self,
- django_db_factory: Callable[..., None],
+ django_db_factory: Callable[..., PostgresDsn],
):
-
- dsn = django_db_factory("gr.common")
+ dsn = django_db_factory("generalresearch.gr_django")
assert isinstance(dsn, PostgresDsn)