From 65ec38012b86816049c55dd3b506a96be22fca76 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Fri, 3 Jul 2026 16:22:49 +0000 Subject: [PATCH] =?UTF-8?q?Abri=20amend=5Fjob=20treats=20an=20unconfirmed?= =?UTF-8?q?=20amendment=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 | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) 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())