diff --git a/engine/apps/api/tests/test_schedules.py b/engine/apps/api/tests/test_schedules.py index fe854b45..aff1ec06 100644 --- a/engine/apps/api/tests/test_schedules.py +++ b/engine/apps/api/tests/test_schedules.py @@ -397,7 +397,7 @@ def test_events_calendar( name="test_calendar_schedule", ) - start_date = timezone.datetime.now().replace(microsecond=0) + start_date = timezone.now().replace(microsecond=0) data = { "start": start_date, "rotation_start": start_date, diff --git a/engine/apps/public_api/tests/test_on_call_shifts.py b/engine/apps/public_api/tests/test_on_call_shifts.py index 0acc3fcf..2934c6c7 100644 --- a/engine/apps/public_api/tests/test_on_call_shifts.py +++ b/engine/apps/public_api/tests/test_on_call_shifts.py @@ -91,6 +91,7 @@ def test_get_override_on_call_shift(make_organization_and_user_with_token, make_ data = { "start": start_date, "rotation_start": start_date, + "duration": datetime.timedelta(seconds=7200), "schedule": schedule, } on_call_shift = make_on_call_shift(organization=organization, shift_type=CustomOnCallShift.TYPE_OVERRIDE, **data) diff --git a/engine/apps/schedules/tests/test_custom_on_call_shift.py b/engine/apps/schedules/tests/test_custom_on_call_shift.py index 8e507c89..1782e483 100644 --- a/engine/apps/schedules/tests/test_custom_on_call_shift.py +++ b/engine/apps/schedules/tests/test_custom_on_call_shift.py @@ -15,6 +15,7 @@ def test_get_on_call_users_from_single_event(make_organization_and_user, make_on data = { "priority_level": 1, "start": date, + "rotation_start": date, "duration": timezone.timedelta(seconds=10800), } @@ -41,6 +42,7 @@ def test_get_on_call_users_from_web_schedule_override(make_organization_and_user data = { "start": date, + "rotation_start": date, "duration": timezone.timedelta(seconds=10800), "schedule": schedule, } @@ -65,6 +67,7 @@ def test_get_on_call_users_from_recurrent_event(make_organization_and_user, make data = { "priority_level": 1, "start": date, + "rotation_start": date, "duration": timezone.timedelta(seconds=10800), "frequency": CustomOnCallShift.FREQUENCY_DAILY, "interval": 2, @@ -107,6 +110,7 @@ def test_get_on_call_users_from_web_schedule_recurrent_event( data = { "priority_level": 1, "start": date, + "rotation_start": date, "duration": timezone.timedelta(seconds=10800), "frequency": CustomOnCallShift.FREQUENCY_DAILY, "interval": 2, @@ -149,6 +153,7 @@ def test_get_on_call_users_from_rolling_users_event( data = { "priority_level": 1, "start": now, + "rotation_start": now, "duration": timezone.timedelta(seconds=10800), "frequency": CustomOnCallShift.FREQUENCY_DAILY, "interval": 2, @@ -221,6 +226,7 @@ def test_get_oncall_users_for_multiple_schedules( shift_type=CustomOnCallShift.TYPE_SINGLE_EVENT, priority_level=1, start=now, + rotation_start=now, duration=timezone.timedelta(minutes=30), ) @@ -229,6 +235,7 @@ def test_get_oncall_users_for_multiple_schedules( shift_type=CustomOnCallShift.TYPE_SINGLE_EVENT, priority_level=1, start=now, + rotation_start=now, duration=timezone.timedelta(minutes=10), ) @@ -237,6 +244,7 @@ def test_get_oncall_users_for_multiple_schedules( shift_type=CustomOnCallShift.TYPE_SINGLE_EVENT, priority_level=1, start=now + timezone.timedelta(minutes=10), + rotation_start=now + timezone.timedelta(minutes=10), duration=timezone.timedelta(minutes=30), ) @@ -275,6 +283,7 @@ def test_shift_convert_to_ical(make_organization_and_user, make_on_call_shift): data = { "priority_level": 1, "start": date, + "rotation_start": date, "duration": timezone.timedelta(seconds=10800), "frequency": CustomOnCallShift.FREQUENCY_HOURLY, "interval": 1,