Abri survey creation trigger ignores deals outside the Abri Condition project 🟥

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-02 15:59:05 +00:00
parent fc2ba88759
commit 882eb1eff9

View file

@ -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
# =======================