From eaedd9a63d4ae21e4071083b2bb9926123e1b625 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 7 Jul 2026 11:44:51 +0000 Subject: [PATCH] =?UTF-8?q?Real=20Abri=20portal=20deals=20fire=20the=20job?= =?UTF-8?q?-logging=20trigger=20=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 | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/etl/hubspot/tests/test_hubspot_deal_differ.py b/etl/hubspot/tests/test_hubspot_deal_differ.py index 5e9bcfdfa..12cb39425 100644 --- a/etl/hubspot/tests/test_hubspot_deal_differ.py +++ b/etl/hubspot/tests/test_hubspot_deal_differ.py @@ -453,6 +453,35 @@ def test_abri_job_logging__project_code_cased_differently__returns_true() -> Non assert result is True +def test_abri_job_logging__real_portal_project_code__returns_true() -> None: + # The code carried by every Abri stock-condition deal in the portal + # (verified 2026-07-07); these deals have no project association, so the + # project_code fallback is the branch that must fire in production. + deal_id = uuid.uuid4() + + # Arrange + old_deal = make_old_deal( + id=deal_id, + project_code="[Abri Stock Condition - Privately Funded - 062026 - 1247536318670]", + confirmed_survey_date=None, + ) + new_deal = make_new_deal( + deal_id, + project_code="[Abri Stock Condition - Privately Funded - 062026 - 1247536318670]", + confirmed_survey_date="2026-07-15", + ) + + # Act + result = HubspotDealDiffer.check_for_abri_job_logging( + new_deal=new_deal, + new_project=None, + old_deal=old_deal, + ) + + # Assert + assert result is True + + @pytest.mark.parametrize( "new_overrides", [