Alpha stage commit

This commit is contained in:
2026-07-01 23:29:51 +02:00
parent b583bb1233
commit e23387738b
84 changed files with 40807 additions and 326 deletions

View File

@@ -0,0 +1,22 @@
from __future__ import annotations
from app.models import Source
from app.source_updates import _recover_missing_managed_cache_url
def test_missing_managed_cache_source_recovers_seed_url_for_online_update():
source = Source(
id=3,
name="Geofabrik Berlin OSM PBF",
kind="osm_pbf",
url="data/sources/source_3/1782478365.osm.pbf",
country="DE",
)
recovery = _recover_missing_managed_cache_url(source)
assert recovery == {
"previous_url": "data/sources/source_3/1782478365.osm.pbf",
"url": "https://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf",
}
assert source.url == "https://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf"