mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-22 08:48:38 +00:00
20 lines
492 B
Python
20 lines
492 B
Python
from typing import Optional
|
|
|
|
import pytest
|
|
|
|
from domain.abri.abandonment import abandon_reason_for_outcome
|
|
from domain.abri.models import AbandonReason
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"outcome",
|
|
["no answer", "cancelled", "no show", "tenant refusal", "not viable", None],
|
|
)
|
|
def test_every_outcome_currently_maps_to_the_carded_reason(
|
|
outcome: Optional[str],
|
|
) -> None:
|
|
# Act
|
|
reason = abandon_reason_for_outcome(outcome)
|
|
|
|
# Assert
|
|
assert reason == AbandonReason.CARDED
|