mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Declare the XML content type the Abri relay requires 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
4a1fdd87a8
commit
0d82f9e660
1 changed files with 16 additions and 0 deletions
|
|
@ -129,6 +129,22 @@ def test_log_job_sends_the_recorded_logjob_envelope_to_the_relay_endpoint(
|
|||
)
|
||||
|
||||
|
||||
def test_log_job_declares_the_xml_body_content_type_the_relay_requires(
|
||||
client: AbriClient, mock_session: MagicMock
|
||||
) -> None:
|
||||
# Arrange: the relay 400s an XML body posted without an XML content type.
|
||||
mock_session.post.return_value.content = _load_fixture(
|
||||
"abri_relay_logjob_success_response.xml"
|
||||
)
|
||||
|
||||
# Act
|
||||
client.log_job(_spec_example_request())
|
||||
|
||||
# Assert
|
||||
headers: dict[str, str] = mock_session.post.call_args.kwargs["headers"]
|
||||
assert headers["Content-Type"] == "application/xml"
|
||||
|
||||
|
||||
# --- abandon_job: rejection (canceljob's own error-details shape) ---
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue