Declare the XML content type the Abri relay requires 🟥

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-08 10:07:04 +00:00
parent 4a1fdd87a8
commit 0d82f9e660

View file

@ -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) ---