diff --git a/tests/applications/abri/test_dispatch.py b/tests/applications/abri/test_dispatch.py index 19a988ee3..aa2c939a8 100644 --- a/tests/applications/abri/test_dispatch.py +++ b/tests/applications/abri/test_dispatch.py @@ -23,6 +23,7 @@ from orchestration.abri_orchestrator import ( DealAbandonment, JobNoNotYetRecordedError, LogJobOrchestrationResult, + PropertyReportedVoid, LogJobSummary, LogJobWriteBackError, TenantDataSyncResult, @@ -426,3 +427,23 @@ def test_the_summary_records_an_abandoned_job( # Assert assert summary == {"abandon_job": "job AC0439951 abandoned"} + + +# --- a void property completes the flow rather than failing the task --- + + +def test_a_void_property_completes_the_tenant_sync_instead_of_failing_the_task( + orchestrator: FakeOrchestrator, deal_database: FakeDealDatabase +) -> None: + # Arrange: an empty property has no signatories, so redelivering the + # message could only park it in the dead-letter queue. + orchestrator.sync_outcome = PropertyReportedVoid(place_ref=PlaceRef("1007165")) + request = _request(["sync_tenant_data"]) + + # Act + summary = dispatch_abri_flows(request, orchestrator, deal_database) + + # Assert + assert summary == { + "sync_tenant_data": "no live tenancy for place 1007165; property noted as void" + }