From 882eb1eff95a5f962404d119544c037dc54e2cf1 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 2 Jul 2026 15:59:05 +0000 Subject: [PATCH] =?UTF-8?q?Abri=20survey=20creation=20trigger=20ignores=20?= =?UTF-8?q?deals=20outside=20the=20Abri=20Condition=20project=20?= =?UTF-8?q?=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- etl/hubspot/tests/test_hubspot_deal_differ.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/etl/hubspot/tests/test_hubspot_deal_differ.py b/etl/hubspot/tests/test_hubspot_deal_differ.py index fcbe80e08..e9372bf6b 100644 --- a/etl/hubspot/tests/test_hubspot_deal_differ.py +++ b/etl/hubspot/tests/test_hubspot_deal_differ.py @@ -398,6 +398,31 @@ def test_abri_survey_creation__date_already_set__returns_false() -> None: assert result is False +def test_abri_survey_creation__non_abri_project_code__returns_false() -> None: + deal_id = uuid.uuid4() + + # Arrange + old_deal = make_old_deal( + id=deal_id, + project_code="Southern Retrofit", + confirmed_survey_date=None, + ) + new_deal = make_new_deal( + deal_id, + project_code="Southern Retrofit", + confirmed_survey_date="2026-07-15", + ) + + # Act + result = HubspotDealDiffer.check_for_abri_survey_creation( + new_deal=new_deal, + old_deal=old_deal, + ) + + # Assert + assert result is False + + # ======================= # DB UPDATE TRIGGER TESTS # =======================