Scale RC10 audit across persisted detections
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-18 07:10:18 +02:00
parent ba84b01692
commit 6438bd418b
2 changed files with 49 additions and 25 deletions
+6 -1
View File
@@ -146,7 +146,10 @@ def test_storage_audit_only_selects_old_unreferenced_allowlisted_files(
assert "release-evidence" in report["cleanup"]["protected_prefixes"]
def test_source_family_report_covers_national_regional_and_maritime(tmp_path: Path) -> None:
def test_source_family_report_covers_national_regional_and_maritime(
tmp_path: Path,
monkeypatch: pytest.MonkeyPatch,
) -> None:
audit = load_script("audit_data_operations.py")
national_id = uuid4()
regional_id = uuid4()
@@ -221,6 +224,8 @@ def test_source_family_report_covers_national_regional_and_maritime(tmp_path: Pa
return Query(rows[owner])
raise AssertionError(f"Unexpected query entity: {model!r}")
monkeypatch.setattr(audit, "query_count", lambda _db, model, *_conditions: len(rows[model]))
monkeypatch.setattr(audit, "query_distinct_nonnull", lambda _db, _column: [])
state = audit.collect_database_state(Session(), tmp_path)
assert {item["source_name"] for item in state["source_families"]["national"]} == {