mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
Treat a missing totalItemCount as a complete evidence list 🟩
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cc3fa54688
commit
7b5a88e7ac
1 changed files with 13 additions and 0 deletions
|
|
@ -408,3 +408,16 @@ def test_get_evidence_list_returns_all_files_when_count_matches_total() -> None:
|
|||
|
||||
# Assert
|
||||
assert [f.file_id for f in result] == ["id-0", "id-1", "id-2"]
|
||||
|
||||
|
||||
def test_get_evidence_list_assumes_complete_when_total_item_count_absent() -> None:
|
||||
# Arrange — a PasHub schema change that drops the field must not fail the fetch
|
||||
client = make_client()
|
||||
payload = {"results": [make_evidence_item()]}
|
||||
client.session.get = MagicMock(return_value=make_response(payload=payload))
|
||||
|
||||
# Act
|
||||
result = client._get_evidence_list("job-1")
|
||||
|
||||
# Assert
|
||||
assert len(result) == 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue