mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Abri deal abandonment requires at least three parseable attempts 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
79423f594c
commit
af85e0ed2b
1 changed files with 38 additions and 0 deletions
|
|
@ -928,6 +928,44 @@ def test_abri_deal_abandonment__non_abri_deal__returns_false() -> None:
|
|||
assert result is False
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"new_overrides",
|
||||
[
|
||||
{"number_of_attempts": "2"},
|
||||
{"number_of_attempts": ""},
|
||||
{"number_of_attempts": "not-a-number"},
|
||||
{},
|
||||
],
|
||||
)
|
||||
def test_abri_deal_abandonment__fewer_than_three_parseable_attempts__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",
|
||||
outcome=None,
|
||||
)
|
||||
new_deal = make_new_deal(
|
||||
deal_id,
|
||||
project_code="Abri Condition",
|
||||
outcome="No Answer",
|
||||
**new_overrides,
|
||||
)
|
||||
|
||||
# Act
|
||||
result = HubspotDealDiffer.check_for_abri_deal_abandonment(
|
||||
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