fix tests
This commit is contained in:
parent
a4c481a1ff
commit
24cfd3686a
3 changed files with 11 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue