mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Abri amend_job omits the surveyor resource so amendments cannot clobber Abri-side reassignments 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
7bdba469fb
commit
b70afc8d9d
1 changed files with 20 additions and 0 deletions
|
|
@ -252,3 +252,23 @@ def test_amend_job_sends_the_recorded_amendoptiappt_envelope_to_the_relay_endpoi
|
|||
assert ET.canonicalize(xml_data=sent_body, strip_text=True) == ET.canonicalize(
|
||||
xml_data=expected_body, strip_text=True
|
||||
)
|
||||
|
||||
|
||||
def test_amend_job_omits_the_resource_parameter_when_no_surveyor_is_provided(
|
||||
client: AbriClient, mock_session: MagicMock
|
||||
) -> None:
|
||||
# Arrange
|
||||
mock_session.post.return_value.content = _load_fixture(
|
||||
"abri_relay_amendoptiappt_success_response.xml"
|
||||
)
|
||||
|
||||
# Act
|
||||
client.amend_job(_spec_example_amend_request())
|
||||
|
||||
# Assert
|
||||
sent_body: bytes = mock_session.post.call_args.kwargs["data"]
|
||||
sent_attributes = [
|
||||
parameter.get("attribute")
|
||||
for parameter in ET.fromstring(sent_body).findall(".//Parameters")
|
||||
]
|
||||
assert "resource" not in sent_attributes
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue