From c4ffaaa069cc0caf613206b27a84bebbc961a14d Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Mon, 1 Jun 2026 15:13:20 +0000 Subject: [PATCH] =?UTF-8?q?`get=5Fevidence=5Ffiles=5Fby=5Fjob=5Fid`=20down?= =?UTF-8?q?loads=20other=20files=20when=20`include=5Fother=3DTrue`=20?= =?UTF-8?q?=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tests/test_pashub_client.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/backend/pashub_fetcher/tests/test_pashub_client.py b/backend/pashub_fetcher/tests/test_pashub_client.py index fa23378d..c6e7b780 100644 --- a/backend/pashub_fetcher/tests/test_pashub_client.py +++ b/backend/pashub_fetcher/tests/test_pashub_client.py @@ -167,3 +167,24 @@ def test_get_evidence_files_by_job_id_returns_downloaded_files_with_empty_other_ assert isinstance(result, DownloadedFiles) assert result.core == ["/tmp/SiteNote_001.pdf"] assert result.other == [] + + +def test_get_evidence_files_by_job_id_downloads_other_files_when_include_other_true() -> None: + # Arrange + client = make_client() + files = [ + make_file(file_name="SiteNote_001.pdf"), + make_file(file_name="unknown_doc.pdf"), + ] + + # Act + with ( + patch.object(client, "_get_evidence_list", return_value=files), + patch.object(client, "_get_evidence_metadata", return_value=make_metadata()), + patch.object(client, "_download_file"), + ): + result = client.get_evidence_files_by_job_id("job-1", include_other=True) + + # Assert + assert result.core == ["/tmp/SiteNote_001.pdf"] + assert result.other == ["/tmp/unknown_doc.pdf"]