From 6b9f5a0140bd03653b3cdc985b87c2ab2e136956 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Fri, 3 Jul 2026 14:28:19 +0000 Subject: [PATCH] =?UTF-8?q?Abri=20log=5Fjob=20raises=20a=20retriable=20tra?= =?UTF-8?q?nsport=20error=20when=20the=20relay=20is=20unreachable=20?= =?UTF-8?q?=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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/infrastructure/abri/test_abri_client.py b/tests/infrastructure/abri/test_abri_client.py index d67624153..54146c825 100644 --- a/tests/infrastructure/abri/test_abri_client.py +++ b/tests/infrastructure/abri/test_abri_client.py @@ -147,3 +147,14 @@ def test_log_job_raises_transport_error_on_http_error_status( # Act / Assert with pytest.raises(AbriTransportError): client.log_job(_spec_example_request()) + + +def test_log_job_raises_transport_error_when_the_relay_is_unreachable( + client: AbriClient, mock_session: MagicMock +) -> None: + # Arrange + mock_session.post.side_effect = requests.ConnectionError("connection refused") + + # Act / Assert + with pytest.raises(AbriTransportError): + client.log_job(_spec_example_request())