diff --git a/tests/infrastructure/abri/test_abri_client.py b/tests/infrastructure/abri/test_abri_client.py index ab8f3d87c..55aa5deb5 100644 --- a/tests/infrastructure/abri/test_abri_client.py +++ b/tests/infrastructure/abri/test_abri_client.py @@ -293,3 +293,30 @@ def test_amend_job_returns_rejection_with_openhousing_error_code_and_message_ver code="RelayError", message="Job_no 1019905 is invalid. Job not found.", ) + + +# --- amend_job: ambiguous responses are retriable, never success or rejection --- + + +@pytest.mark.parametrize( + "body", + [ + b'', + b'', + b'', + b"", + b"", + ], +) +def test_amend_job_raises_retriable_parse_error_when_the_amendment_is_unconfirmed( + client: AbriClient, mock_session: MagicMock, body: bytes +) -> None: + # Arrange + mock_session.post.return_value.content = body + + # Act / Assert + with pytest.raises(AbriResponseParseError): + client.amend_job(_spec_example_amend_request())