Prefer governed orthophoto editions in source status
This commit is contained in:
@@ -157,6 +157,33 @@ def test_rolling_orthophoto_prefers_explicit_current_snapshot_over_historical_ob
|
||||
assert report.items[0].latest_source_version == "most_recent_at_2026-07-14"
|
||||
|
||||
|
||||
def test_orthophoto_freshness_prefers_governed_official_edition_over_rolling_marker() -> None:
|
||||
legacy = _dataset(
|
||||
"digitaal_vlaanderen_orthophoto",
|
||||
imported_at=NOW - timedelta(days=2),
|
||||
observed_at=datetime(2026, 7, 15, tzinfo=timezone.utc),
|
||||
source_version="most_recent_at_2026-07-15",
|
||||
)
|
||||
official = _dataset(
|
||||
"digitaal_vlaanderen_orthophoto",
|
||||
imported_at=NOW - timedelta(days=1),
|
||||
observed_at=datetime(2025, 4, 5, tzinfo=timezone.utc),
|
||||
source_version="2025.04",
|
||||
)
|
||||
|
||||
report = SourceFreshnessService.build_report(
|
||||
legacy.project_id,
|
||||
[legacy, official],
|
||||
[_version(legacy), _version(official)],
|
||||
now=NOW,
|
||||
)
|
||||
|
||||
item = report.items[0]
|
||||
assert item.latest_source_version == "2025.04"
|
||||
assert item.refresh_policy == "rolling_snapshot"
|
||||
assert item.review_interval_days == 180
|
||||
|
||||
|
||||
def test_spatial_partitions_do_not_become_a_false_historical_series() -> None:
|
||||
first = _dataset(
|
||||
"dov_soil_map",
|
||||
|
||||
Reference in New Issue
Block a user