mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
A deal crossing into abandonment builds an abandon_job message 🟥
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
70fb6d5735
commit
aaa8c9763f
1 changed files with 7 additions and 4 deletions
|
|
@ -62,6 +62,7 @@ def test_a_first_confirmed_survey_date_builds_a_log_job_message() -> None:
|
|||
"deal_name": "49 Admers Crescent",
|
||||
"confirmed_survey_date": "2026-06-24",
|
||||
"confirmed_survey_time": "14:30",
|
||||
"outcome": None,
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -185,9 +186,9 @@ def test_no_message_for_a_non_abri_deal() -> None:
|
|||
assert message is None
|
||||
|
||||
|
||||
def test_abandonment_alone_stays_unwired_and_builds_no_message() -> None:
|
||||
# Arrange: the abandonment predicate would fire, but CancelJob does not
|
||||
# exist yet, so no flow may be dispatched for it.
|
||||
def test_a_deal_crossing_into_abandonment_builds_an_abandon_job_message() -> None:
|
||||
# Arrange: attempts reach the threshold with a negative outcome, so the
|
||||
# deal crosses into the abandoned state and the abandon flow fires.
|
||||
old_deal = make_old_deal(
|
||||
project_code=ABRI_PROJECT_CODE, number_of_attempts="2", outcome=None
|
||||
)
|
||||
|
|
@ -203,7 +204,9 @@ def test_abandonment_alone_stays_unwired_and_builds_no_message() -> None:
|
|||
)
|
||||
|
||||
# Assert
|
||||
assert message is None
|
||||
assert message is not None
|
||||
assert message["flows"] == ["abandon_job"]
|
||||
assert message["outcome"] == "no answer"
|
||||
|
||||
|
||||
# ==========================
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue