tests: fix recurring event test (#78084)
gitea/chrono/pipeline/head This commit looks good Details

This commit is contained in:
Valentin Deniaud 2023-07-04 13:41:09 +02:00
parent 152110888c
commit 6b79f58bd5
1 changed files with 6 additions and 6 deletions

View File

@ -1750,7 +1750,7 @@ def test_recurring_events_api_fillslots_partial_bookings_update(app, user):
end_time=datetime.time(18, 00),
places=2,
recurrence_end_date=start_datetime + datetime.timedelta(days=30),
recurrence_days=[1, 2],
recurrence_days=[2, 3],
agenda=agenda,
)
event.create_all_recurrences()
@ -1759,7 +1759,7 @@ def test_recurring_events_api_fillslots_partial_bookings_update(app, user):
params = {
'user_external_id': 'user_id',
'slots': 'foo-bar@event-08-18:1',
'slots': 'foo-bar@event-08-18:2',
'start_time': '10:00',
'end_time': '15:00',
}
@ -1771,7 +1771,7 @@ def test_recurring_events_api_fillslots_partial_bookings_update(app, user):
Booking.objects.filter(
start_time=datetime.time(10, 00),
end_time=datetime.time(15, 00),
event__start_datetime__week_day=3,
event__start_datetime__iso_week_day=2,
).count()
== 5
)
@ -1787,13 +1787,13 @@ def test_recurring_events_api_fillslots_partial_bookings_update(app, user):
cancellation_datetime__isnull=True,
start_time=datetime.time(10, 00),
end_time=datetime.time(15, 00),
event__start_datetime__week_day=3,
event__start_datetime__iso_week_day=2,
).count()
== 5
)
# change day
params['slots'] = 'foo-bar@event-08-18:2'
params['slots'] = 'foo-bar@event-08-18:3'
resp = app.post_json(fillslots_url, params=params)
assert resp.json['booking_count'] == 5
assert resp.json['cancelled_booking_count'] == 5
@ -1803,7 +1803,7 @@ def test_recurring_events_api_fillslots_partial_bookings_update(app, user):
cancellation_datetime__isnull=True,
start_time=datetime.time(10, 00),
end_time=datetime.time(15, 00),
event__start_datetime__week_day=4,
event__start_datetime__iso_week_day=3,
).count()
== 5
)