Return the full evidence list when the response is complete 🟩

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-22 12:58:16 +00:00
parent c95d3b20dc
commit cc3fa54688

View file

@ -392,3 +392,19 @@ def test_get_evidence_list_raises_when_response_is_truncated() -> None:
# Act / Assert
with pytest.raises(TruncatedEvidenceListError, match=r"100 of 250"):
client._get_evidence_list("job-1")
def test_get_evidence_list_returns_all_files_when_count_matches_total() -> None:
# Arrange
client = make_client()
payload = {
"results": [make_evidence_item(f"id-{i}") for i in range(3)],
"totalItemCount": 3,
}
client.session.get = MagicMock(return_value=make_response(payload=payload))
# Act
result = client._get_evidence_list("job-1")
# Assert
assert [f.file_id for f in result] == ["id-0", "id-1", "id-2"]