Abri survey amendment trigger ignores deals that are not Abri condition deals 🟥

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-02 16:47:51 +00:00
parent dbbb12fa54
commit 16b25c4b54

View file

@ -579,6 +579,32 @@ def test_abri_survey_amendment__date_changed_on_abri_deal__returns_true() -> Non
assert result is True
def test_abri_survey_amendment__non_abri_deal__returns_false() -> None:
deal_id = uuid.uuid4()
# Arrange
old_deal = make_old_deal(
id=deal_id,
project_code="Southern Retrofit",
confirmed_survey_date=datetime(2026, 7, 1, tzinfo=timezone.utc),
)
new_deal = make_new_deal(
deal_id,
project_code="Southern Retrofit",
confirmed_survey_date="2026-07-15",
)
# Act
result = HubspotDealDiffer.check_for_abri_survey_amendment(
new_deal=new_deal,
new_project=None,
old_deal=old_deal,
)
# Assert
assert result is False
# =======================
# DB UPDATE TRIGGER TESTS
# =======================