get_evidence_files_by_job_id downloads other files when include_other=True 🟥

This commit is contained in:
Daniel Roth 2026-06-01 15:13:20 +00:00 committed by Jun-te Kim
parent f95b6bdd7d
commit c4ffaaa069

View file

@ -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"]