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())