mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
get_evidence_files_by_job_id downloads other files when include_other=True 🟥
This commit is contained in:
parent
f95b6bdd7d
commit
c4ffaaa069
1 changed files with 21 additions and 0 deletions
|
|
@ -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"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue