From 6ee560af290fd8ce0933646905e57f5e8803f7e3 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Mon, 27 Jul 2026 11:23:49 +0000 Subject: [PATCH] =?UTF-8?q?Keep=20the=20query-dump=20form=20of=20"no=20ten?= =?UTF-8?q?ancy=20found"=20a=20rejection=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5 (1M context) --- tests/infrastructure/abri/test_abri_client.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/infrastructure/abri/test_abri_client.py b/tests/infrastructure/abri/test_abri_client.py index 7fa5a95a4..312bdc592 100644 --- a/tests/infrastructure/abri/test_abri_client.py +++ b/tests/infrastructure/abri/test_abri_client.py @@ -575,3 +575,20 @@ def test_get_tenant_data_reports_a_void_property_when_abri_finds_no_tenancy( # Assert assert result == NoTenancyFound(place_ref=PlaceRef("1004202A")) + + +def test_get_tenant_data_still_rejects_the_query_dump_form_of_no_tenancy_found( + client: AbriClient, mock_session: MagicMock +) -> None: + # Arrange: the same words, dumped as a 4GL query. Abri does not send this + # to mean "known empty", so it must not be read as a void property. + mock_session.post.return_value.content = _load_fixture( + "abri_relay_getscstenantdata_relayerror_response.xml" + ) + + # Act + result = client.get_tenant_data(PlaceRef("1004202A")) + + # Assert + assert isinstance(result, AbriRequestRejected) + assert result.message.startswith("No Tenancy Found for Query")