From a325f65bf04aa223f20b5621736ad04d0573efa2 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Fri, 3 Jul 2026 14:30:02 +0000 Subject: [PATCH] =?UTF-8?q?Abri=20log=5Fjob=20treats=20an=20unexpectedly?= =?UTF-8?q?=20shaped=20relay=20response=20as=20retriable=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- tests/infrastructure/abri/test_abri_client.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/infrastructure/abri/test_abri_client.py b/tests/infrastructure/abri/test_abri_client.py index 2b232455c..ab9452cb2 100644 --- a/tests/infrastructure/abri/test_abri_client.py +++ b/tests/infrastructure/abri/test_abri_client.py @@ -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"", + b"true", + b"", + ], +) +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())