./manage.py test appointment.tests.utils.test_db_helpers --shuffle
Using shuffle seed: 4356288042 (generated)
Found 87 test(s).
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
...........................................E.......2024-03-27 02:06:11,934 - appointment.logger_config - INFO - Scheduling email reminder for appointment 1 at 2024-03-26 09:00:00+01:00
.................F....F...2024-03-27 02:06:25,464 - appointment.logger_config - INFO - Rescheduling is allowed for service Test Service -> Reschedule count: 0, Reschedule limit: 0
.2024-03-27 02:06:26,213 - appointment.logger_config - INFO - Rescheduling is allowed but no specific limit set for service Test Service -> Reschedule count: 0, Reschedule limit: 3
.2024-03-27 02:06:26,947 - appointment.logger_config - INFO - Rescheduling is allowed for service Test Service -> Reschedule count: 4, Reschedule limit: 3
.2024-03-27 02:06:27,704 - appointment.logger_config - INFO - Rescheduling is allowed but no specific limit set for service Test Service -> Reschedule count: 2, Reschedule limit: 3
2024-03-27 02:06:27,705 - appointment.logger_config - INFO - Rescheduling is allowed but no specific limit set for service Test Service -> Reschedule count: 3, Reschedule limit: 3
.2024-03-27 02:06:28,384 - appointment.logger_config - INFO - New appointment created: {'id': 1, 'client_name': 'Tester2', 'client_email': '[email protected]', 'start_time': '1900-01-01 09:00', 'end_time': '1900-01-01 10:00', 'service_name': 'Test Service', 'address': '123 Main St', 'want_reminder': True, 'additional_info': 'Additional Test Info', 'paid': False, 'amount_to_pay': 100, 'id_request': '171150158838388516e2e264025104d8c93e8144a07168c8c'}
Missing conf: []
2024-03-27 02:06:28,384 - appointment.logger_config - INFO - Scheduling email reminder for appointment 1 at 2024-03-26 09:00:00+01:00
......
======================================================================
ERROR: test_calculate_slots_on_working_day_without_appointments (appointment.tests.utils.test_db_helpers.TestCalculateStaffSlots)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/mathieu/dev/django-appointment/appointment/tests/utils/test_db_helpers.py", line 109, in test_calculate_slots_on_working_day_without_appointments
slots = calculate_staff_slots(self.working_date, self.staff_member1)
File "/Users/mathieu/dev/django-appointment/appointment/utils/db_helpers.py", line 75, in calculate_staff_slots
buffer_duration_minutes = get_staff_member_buffer_time(staff_member, date)
File "/Users/mathieu/dev/django-appointment/appointment/utils/db_helpers.py", line 538, in get_staff_member_buffer_time
_, _, _, buff_time = get_times_from_config(date)
File "/Users/mathieu/dev/django-appointment/appointment/utils/db_helpers.py", line 593, in get_times_from_config
start_time = datetime.datetime.combine(date, datetime.time(hour=config.lead_time.hour,
AttributeError: 'NoneType' object has no attribute 'hour'
======================================================================
FAIL: test_staff_member_buffer_time_with_global_setting (appointment.tests.utils.test_db_helpers.TestStaffMemberTimeFunctions)
Test buffer time when staff member-specific setting is None.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/mathieu/.pyenv/versions/3.10.13/lib/python3.10/unittest/mock.py", line 1379, in patched
return func(*newargs, **newkeywargs)
File "/Users/mathieu/dev/django-appointment/appointment/tests/utils/test_db_helpers.py", line 814, in test_staff_member_buffer_time_with_global_setting
self.assertEqual(buffer_time, 60) # Global setting
AssertionError: 90.0 != 60
======================================================================
FAIL: test_staff_member_slot_duration_with_global_setting (appointment.tests.utils.test_db_helpers.TestStaffMemberTimeFunctions)
Test slot duration when staff member-specific setting is None.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/mathieu/.pyenv/versions/3.10.13/lib/python3.10/unittest/mock.py", line 1379, in patched
return func(*newargs, **newkeywargs)
File "/Users/mathieu/dev/django-appointment/appointment/tests/utils/test_db_helpers.py", line 826, in test_staff_member_slot_duration_with_global_setting
self.assertEqual(slot_duration, 30) # Global setting
AssertionError: 45.0 != 30
----------------------------------------------------------------------
Ran 87 tests in 47.532s
FAILED (failures=2, errors=1)
Used shuffle seed: 4356288042 (generated)
Destroying test database for alias 'default'...
You can reproduce these failures by re-running the test suite shuffled with the same seed:
./manage.py test appointment.tests.utils.test_db_helpers --shuffle 4356288042
.