mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Abri tenant data fetch requires a parseable new commencement date 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
b4d2d9cd37
commit
47842da7b9
1 changed files with 36 additions and 0 deletions
|
|
@ -772,6 +772,42 @@ def test_abri_tenant_data_fetch__commencement_date_already_set__returns_false()
|
|||
assert result is False
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"new_overrides",
|
||||
[
|
||||
{},
|
||||
{"expected_commencement_date": ""},
|
||||
{"expected_commencement_date": "not-a-date"},
|
||||
],
|
||||
)
|
||||
def test_abri_tenant_data_fetch__no_parseable_new_commencement_date__returns_false(
|
||||
new_overrides: Dict[str, str],
|
||||
) -> None:
|
||||
deal_id = uuid.uuid4()
|
||||
|
||||
# Arrange
|
||||
old_deal = make_old_deal(
|
||||
id=deal_id,
|
||||
project_code="Abri Condition",
|
||||
expected_commencement_date=None,
|
||||
)
|
||||
new_deal = make_new_deal(
|
||||
deal_id,
|
||||
project_code="Abri Condition",
|
||||
**new_overrides,
|
||||
)
|
||||
|
||||
# Act
|
||||
result = HubspotDealDiffer.check_for_abri_tenant_data_fetch(
|
||||
new_deal=new_deal,
|
||||
new_project=None,
|
||||
old_deal=old_deal,
|
||||
)
|
||||
|
||||
# Assert
|
||||
assert result is False
|
||||
|
||||
|
||||
# =======================
|
||||
# DB UPDATE TRIGGER TESTS
|
||||
# =======================
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue