feat(scope): make Belgium and North Sea operational default
This commit is contained in:
@@ -119,7 +119,7 @@ def test_model_asset_catalog_lists_supported_local_model_files(tmp_path: Path) -
|
||||
assert asset.size_bytes == len(b"local model")
|
||||
assert len(asset.sha256) == 64
|
||||
assert asset.active is True
|
||||
assert asset.status == "available"
|
||||
assert asset.status == "approved"
|
||||
assert asset.will_download_models is False
|
||||
|
||||
|
||||
@@ -134,6 +134,25 @@ def test_model_asset_catalog_resolves_known_asset(tmp_path: Path) -> None:
|
||||
assert asset.model_path == str(model_file)
|
||||
|
||||
|
||||
def test_model_asset_catalog_only_exposes_explicit_active_asset_in_runtime(tmp_path: Path) -> None:
|
||||
active_file = tmp_path / "approved-building-detector.pt"
|
||||
active_file.write_bytes(b"approved")
|
||||
(tmp_path / "training-smoke.pt").write_bytes(b"experiment")
|
||||
(tmp_path / "partial-checkpoint.pt").write_bytes(b"partial")
|
||||
settings = Settings(
|
||||
yolo_models_dir=str(tmp_path),
|
||||
yolo_model_path=str(active_file),
|
||||
yolo_enabled=True,
|
||||
)
|
||||
|
||||
response = ModelAssetCatalogService.list_assets(settings=settings)
|
||||
|
||||
assert response.total == 1
|
||||
assert response.items[0].filename == active_file.name
|
||||
assert response.items[0].active is True
|
||||
assert response.items[0].status == "approved"
|
||||
|
||||
|
||||
def test_model_asset_catalog_rejects_unknown_asset(tmp_path: Path) -> None:
|
||||
settings = Settings(yolo_models_dir=str(tmp_path), yolo_enabled=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user