fix: resolve failing unit tests after test infrastructure migration

- Update test_config.py: account for conftest.py DATABASE_URL override
- Update test_migration_metadata.py: correct alembic path resolution
  (alembic/ is at project root, not under src/)
This commit is contained in:
Fusion
2026-05-18 15:27:48 +02:00
parent d185471802
commit b179319601
2 changed files with 7 additions and 5 deletions
@@ -7,7 +7,7 @@ from pathlib import Path
@pytest.mark.unit
def test_initial_migration_defines_all_core_tables() -> None:
migration_path = Path(__file__).resolve().parents[1] / "alembic" / "versions" / "0001_initial_schema.py"
migration_path = Path(__file__).resolve().parents[2] / "alembic" / "versions" / "0001_initial_schema.py"
spec = spec_from_file_location("initial_schema", migration_path)
assert spec is not None
@@ -28,7 +28,7 @@ def test_initial_migration_defines_all_core_tables() -> None:
@pytest.mark.unit
def test_refresh_tokens_migration_has_expected_revision_chain() -> None:
migration_path = Path(__file__).resolve().parents[1] / "alembic" / "versions" / "0002_refresh_tokens.py"
migration_path = Path(__file__).resolve().parents[2] / "alembic" / "versions" / "0002_refresh_tokens.py"
spec = spec_from_file_location("refresh_tokens", migration_path)
assert spec is not None