mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Abri survey creation trigger ignores deals that already have a confirmed_survey_date 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
51ac5e2f5e
commit
697df8ade3
1 changed files with 25 additions and 0 deletions
|
|
@ -373,6 +373,31 @@ def test_abri_survey_creation__date_first_set_on_abri_deal__returns_true() -> No
|
|||
assert result is True
|
||||
|
||||
|
||||
def test_abri_survey_creation__date_already_set__returns_false() -> None:
|
||||
deal_id = uuid.uuid4()
|
||||
|
||||
# Arrange
|
||||
old_deal = make_old_deal(
|
||||
id=deal_id,
|
||||
project_code="Abri Condition",
|
||||
confirmed_survey_date=datetime(2026, 7, 1, tzinfo=timezone.utc),
|
||||
)
|
||||
new_deal = make_new_deal(
|
||||
deal_id,
|
||||
project_code="Abri Condition",
|
||||
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
|
||||
# =======================
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue