fix: commit semantic repair changes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# [DEF:backend.tests.core.migration.test_archive_parser:Module]
|
||||
# [DEF:TestArchiveParser:Module]
|
||||
#
|
||||
# @COMPLEXITY: 3
|
||||
# @PURPOSE: Unit tests for MigrationArchiveParser ZIP extraction contract.
|
||||
@@ -20,6 +20,8 @@ if backend_dir not in sys.path:
|
||||
from src.core.migration.archive_parser import MigrationArchiveParser
|
||||
|
||||
|
||||
# [DEF:test_extract_objects_from_zip_collects_all_types:Function]
|
||||
# @RELATION: BINDS_TO -> TestArchiveParser
|
||||
def test_extract_objects_from_zip_collects_all_types():
|
||||
parser = MigrationArchiveParser()
|
||||
with tempfile.TemporaryDirectory() as td:
|
||||
@@ -59,4 +61,5 @@ def test_extract_objects_from_zip_collects_all_types():
|
||||
raise AssertionError("dataset uuid mismatch")
|
||||
|
||||
|
||||
# [/DEF:backend.tests.core.migration.test_archive_parser:Module]
|
||||
# [/DEF:TestArchiveParser:Module]
|
||||
# [/DEF:test_extract_objects_from_zip_collects_all_types:Function]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# [DEF:backend.tests.core.migration.test_dry_run_orchestrator:Module]
|
||||
# [DEF:TestDryRunOrchestrator:Module]
|
||||
#
|
||||
# @COMPLEXITY: 3
|
||||
# @PURPOSE: Unit tests for MigrationDryRunService diff and risk computation contracts.
|
||||
@@ -23,11 +23,17 @@ from src.models.dashboard import DashboardSelection
|
||||
from src.models.mapping import Base
|
||||
|
||||
|
||||
# [DEF:_load_fixture:Function]
|
||||
# @RELATION: BINDS_TO -> TestDryRunOrchestrator
|
||||
def _load_fixture() -> dict:
|
||||
fixture_path = Path(__file__).parents[2] / "fixtures" / "migration_dry_run_fixture.json"
|
||||
return json.loads(fixture_path.read_text())
|
||||
|
||||
|
||||
# [/DEF:_load_fixture:Function]
|
||||
|
||||
# [DEF:_make_session:Function]
|
||||
# @RELATION: BINDS_TO -> TestDryRunOrchestrator
|
||||
def _make_session():
|
||||
engine = create_engine(
|
||||
"sqlite:///:memory:",
|
||||
@@ -39,6 +45,10 @@ def _make_session():
|
||||
return Session()
|
||||
|
||||
|
||||
# [/DEF:_make_session:Function]
|
||||
|
||||
# [DEF:test_migration_dry_run_service_builds_diff_and_risk:Function]
|
||||
# @RELATION: BINDS_TO -> TestDryRunOrchestrator
|
||||
def test_migration_dry_run_service_builds_diff_and_risk():
|
||||
# @TEST_CONTRACT: dry_run_result_contract -> {
|
||||
# required_fields: {diff: object, summary: object, risk: object},
|
||||
@@ -107,4 +117,5 @@ def test_migration_dry_run_service_builds_diff_and_risk():
|
||||
raise AssertionError("breaking_reference risk is not detected")
|
||||
|
||||
|
||||
# [/DEF:backend.tests.core.migration.test_dry_run_orchestrator:Module]
|
||||
# [/DEF:TestDryRunOrchestrator:Module]
|
||||
# [/DEF:test_migration_dry_run_service_builds_diff_and_risk:Function]
|
||||
|
||||
Reference in New Issue
Block a user