| 1234567891011121314151617181920212223242526272829303132333435 |
- from app.core.protocol_status_display import INACTIVE_PROTOCOL_STATUSES
- from app.crud.storage_release_review import (
- inbound_work_orders_all_void,
- is_inactive_protocol_status_for_hide,
- )
- def test_inactive_protocol_statuses_match_shared_constant():
- assert is_inactive_protocol_status_for_hide("yzf") is True
- assert is_inactive_protocol_status_for_hide("sdfq") is True
- assert is_inactive_protocol_status_for_hide(" SDFQ ") is True
- assert is_inactive_protocol_status_for_hide("sxz") is False
- assert is_inactive_protocol_status_for_hide("zky") is False
- assert is_inactive_protocol_status_for_hide("") is False
- assert is_inactive_protocol_status_for_hide(None) is False
- assert set(INACTIVE_PROTOCOL_STATUSES) == {"yzf", "sdfq"}
- def test_inbound_work_orders_all_void_requires_at_least_one():
- assert inbound_work_orders_all_void([]) is False
- assert inbound_work_orders_all_void([""]) is False
- assert inbound_work_orders_all_void([" "]) is False
- def test_inbound_work_orders_all_void_true_when_every_status_is_yzf():
- assert inbound_work_orders_all_void(["yzf"]) is True
- assert inbound_work_orders_all_void(["yzf", "yzf"]) is True
- assert inbound_work_orders_all_void([" YZF ", "yzf"]) is True
- def test_inbound_work_orders_all_void_false_when_any_non_void():
- assert inbound_work_orders_all_void(["yzf", "ywc"]) is False
- assert inbound_work_orders_all_void(["dpz"]) is False
- assert inbound_work_orders_all_void(["ywc"]) is False
- assert inbound_work_orders_all_void(["yzf", ""]) is False
|