Abri log_job treats an unexpectedly shaped relay response as retriable 🟥

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-03 14:30:02 +00:00
parent 0df1d866fe
commit a325f65bf0

View file

@ -172,3 +172,22 @@ def test_log_job_raises_retriable_parse_error_on_a_malformed_response_body(
# Act / Assert
with pytest.raises(AbriResponseParseError):
client.log_job(_spec_example_request())
@pytest.mark.parametrize(
"body",
[
b"<Root><Jobs></Jobs></Root>",
b"<response><success>true</success></response>",
b"<unexpected />",
],
)
def test_log_job_raises_retriable_parse_error_on_an_unexpectedly_shaped_response(
client: AbriClient, mock_session: MagicMock, body: bytes
) -> None:
# Arrange
mock_session.post.return_value.content = body
# Act / Assert
with pytest.raises(AbriResponseParseError):
client.log_job(_spec_example_request())