diff --git a/tests/test_download_models.py b/tests/test_download_models.py index edd13be..366bd81 100644 --- a/tests/test_download_models.py +++ b/tests/test_download_models.py @@ -9,11 +9,16 @@ from backend.app.scripts import download_models as dm def test_ensure_camie_skips_when_present(tmp_path, monkeypatch): + """v2 layout (HF Camais03/camie-tagger-v2): the ONNX file is named + camie-tagger-v2.onnx (not model.onnx) and tags ship inside + camie-tagger-v2-metadata.json (not selected_tags.csv). Both at root. + Updated 2026-05-25 after the actual repo layout was confirmed via + WebFetch — the old assertion pinned the v1 filenames.""" monkeypatch.setattr(dm, "MODEL_ROOT", tmp_path) camie = tmp_path / "camie" camie.mkdir(parents=True) - (camie / "model.onnx").write_bytes(b"x") - (camie / "selected_tags.csv").write_text("tag_id,name,category,count\n") + (camie / "camie-tagger-v2.onnx").write_bytes(b"x") + (camie / "camie-tagger-v2-metadata.json").write_text("{}") with patch.object(dm, "_snapshot") as snap: dm.ensure_camie() snap.assert_not_called()