mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Abri booking with no confirmed time books an all-day appointment 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
fef69145da
commit
da4caea407
3 changed files with 23 additions and 0 deletions
7
domain/abri/slots.py
Normal file
7
domain/abri/slots.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
from typing import Optional
|
||||
|
||||
from domain.abri.models import SlotCode
|
||||
|
||||
|
||||
def slot_for_confirmed_time(confirmed_time: Optional[str]) -> SlotCode:
|
||||
raise NotImplementedError
|
||||
0
tests/domain/abri/__init__.py
Normal file
0
tests/domain/abri/__init__.py
Normal file
16
tests/domain/abri/test_slots.py
Normal file
16
tests/domain/abri/test_slots.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from typing import Optional
|
||||
|
||||
import pytest
|
||||
|
||||
from domain.abri.slots import slot_for_confirmed_time
|
||||
|
||||
|
||||
@pytest.mark.parametrize("confirmed_time", [None, "", " "])
|
||||
def test_a_booking_with_no_confirmed_time_is_an_all_day_appointment(
|
||||
confirmed_time: Optional[str],
|
||||
) -> None:
|
||||
# Act
|
||||
slot = slot_for_confirmed_time(confirmed_time)
|
||||
|
||||
# Assert
|
||||
assert slot == "AD"
|
||||
Loading…
Add table
Reference in a new issue