diff --git a/etl/hubspot/hubspot_deal_differ.py b/etl/hubspot/hubspot_deal_differ.py index 967a8de5b..46de2314d 100644 --- a/etl/hubspot/hubspot_deal_differ.py +++ b/etl/hubspot/hubspot_deal_differ.py @@ -268,8 +268,8 @@ class HubspotDealDiffer: ), "confirmed_survey_time": new_deal.get("confirmed_survey_time"), # Carried for the log/amend flows: sent to OpenHousing as the - # bookable resource, falling back to the configured default - # surveyor when absent. + # bookable resource. Mandatory for those flows — a deal without + # it fails the message contract's validation and dead-letters. "third_party_surveyor_identifier": new_deal.get( "third_party_surveyor_identifier" ), diff --git a/tests/orchestration/test_abri_orchestrator_amend_job.py b/tests/orchestration/test_abri_orchestrator_amend_job.py index 1fb4fef12..86198ca48 100644 --- a/tests/orchestration/test_abri_orchestrator_amend_job.py +++ b/tests/orchestration/test_abri_orchestrator_amend_job.py @@ -126,8 +126,8 @@ def test_amend_job_books_the_deals_third_party_surveyor_as_the_resource( mock_session: MagicMock, deal_database: FakeDealDatabase, ) -> None: - # Arrange: a deal carrying a third-party surveyor identifier amends the - # appointment against that resource instead of the configured default. + # Arrange: the deal's third-party surveyor identifier is booked as the + # amended appointment's resource. deal_database.job_nos[DEAL_ID] = JOB_NO mock_session.post.return_value.content = _load_fixture( "abri_relay_amendoptiappt_success_response.xml" diff --git a/tests/orchestration/test_abri_orchestrator_log_job.py b/tests/orchestration/test_abri_orchestrator_log_job.py index 86d22211e..0e8dbdd0b 100644 --- a/tests/orchestration/test_abri_orchestrator_log_job.py +++ b/tests/orchestration/test_abri_orchestrator_log_job.py @@ -145,8 +145,8 @@ def test_log_job_sends_a_logjob_envelope_built_from_the_deals_fields( def test_log_job_books_the_deals_third_party_surveyor_as_the_resource( orchestrator: AbriOrchestrator, mock_session: MagicMock ) -> None: - # Arrange: a deal carrying a third-party surveyor identifier books the - # job against that resource instead of the configured default surveyor. + # Arrange: the deal's third-party surveyor identifier is booked as the + # job's resource. mock_session.post.return_value.content = _load_fixture( "abri_relay_logjob_success_response.xml" )