@@ -471,8 +471,9 @@ def test_available_slots(self):
471
471
"""Test if available slots are returned correctly."""
472
472
# On a Wednesday, the staff member should have slots from 9 AM to 5 PM
473
473
slots = get_available_slots_for_staff (self .next_wednesday , self .staff_member1 )
474
- expected_slots = [f"{ hour :02d} :00 AM" for hour in range (9 , 12 )] + ["12:00 PM" ] + \
475
- [f"{ hour :02d} :00 PM" for hour in range (1 , 5 )]
474
+ expected_slots = [
475
+ datetime .datetime (self .next_wednesday .year , self .next_wednesday .month , self .next_wednesday .day , hour ) for
476
+ hour in range (9 , 17 )]
476
477
self .assertEqual (slots , expected_slots )
477
478
478
479
def test_booked_slots (self ):
@@ -490,7 +491,9 @@ def test_booked_slots(self):
490
491
491
492
# Now, the staff member should not have that slot available
492
493
slots = get_available_slots_for_staff (self .next_wednesday , self .staff_member1 )
493
- expected_slots = ['09:00 AM' , '11:00 AM' , '12:00 PM' , '01:00 PM' , '02:00 PM' , '03:00 PM' , '04:00 PM' ]
494
+ expected_slots = [
495
+ datetime .datetime (self .next_wednesday .year , self .next_wednesday .month , self .next_wednesday .day , hour , 0 ) for
496
+ hour in range (9 , 17 ) if hour != 10 ]
494
497
self .assertEqual (slots , expected_slots )
495
498
496
499
def test_no_working_hours (self ):
0 commit comments