From 6b1bb8764704f4f1420b824b1d065bb259a76fae Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 25 May 2026 11:12:55 -0400 Subject: [PATCH] =?UTF-8?q?fix(tests):=20update=20test=5Fensure=5Fcamie=5F?= =?UTF-8?q?skips=5Fwhen=5Fpresent=20to=20v2=20filenames=20(camie-tagger-v2?= =?UTF-8?q?.onnx=20+=20camie-tagger-v2-metadata.json)=20=E2=80=94=20pinned?= =?UTF-8?q?-test=20bounce=20from=203b3e756?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/test_download_models.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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()