mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Abri log_job treats an unexpectedly shaped relay response as retriable 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
0df1d866fe
commit
a325f65bf0
1 changed files with 19 additions and 0 deletions
|
|
@ -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"<Root><Jobs></Jobs></Root>",
|
||||
b"<response><success>true</success></response>",
|
||||
b"<unexpected />",
|
||||
],
|
||||
)
|
||||
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())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue