mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Abri survey creation trigger falls back to project code only when no project is associated 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
cf5a272d7e
commit
911e77d7cf
1 changed files with 29 additions and 0 deletions
|
|
@ -519,6 +519,35 @@ def test_abri_survey_creation__associated_abri_project_id__returns_true() -> Non
|
|||
assert result is True
|
||||
|
||||
|
||||
def test_abri_survey_creation__non_abri_project_id_with_abri_code__returns_false() -> (
|
||||
None
|
||||
):
|
||||
deal_id = uuid.uuid4()
|
||||
|
||||
# Arrange
|
||||
old_deal = make_old_deal(
|
||||
id=deal_id,
|
||||
project_code="Abri Condition",
|
||||
confirmed_survey_date=None,
|
||||
)
|
||||
new_deal = make_new_deal(
|
||||
deal_id,
|
||||
project_code="Abri Condition",
|
||||
confirmed_survey_date="2026-07-15",
|
||||
)
|
||||
new_project = ProjectData(project_id="999999", name="Southern Retrofit")
|
||||
|
||||
# Act
|
||||
result = HubspotDealDiffer.check_for_abri_survey_creation(
|
||||
new_deal=new_deal,
|
||||
new_project=new_project,
|
||||
old_deal=old_deal,
|
||||
)
|
||||
|
||||
# Assert
|
||||
assert result is False
|
||||
|
||||
|
||||
# =======================
|
||||
# DB UPDATE TRIGGER TESTS
|
||||
# =======================
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue