tests: add test with exception completely covering opening hours of a desk (#43126)
This commit is contained in:
parent
2f3afe5ad2
commit
fc2108bbb5
|
@ -2280,6 +2280,16 @@ def test_agenda_meeting_api_exception(app, meetings_agenda, user):
|
|||
resp2 = app.get('/api/agenda/meetings/%s/datetimes/' % meeting_type.id)
|
||||
assert len(resp.json['data']) == len(resp2.json['data']) + 6
|
||||
|
||||
# cover completely
|
||||
full_coverage = TimePeriodException.objects.create(
|
||||
desk=excp1.desk,
|
||||
start_datetime=make_aware(datetime.datetime(2017, 1, 1, 0, 0)),
|
||||
end_datetime=make_aware(datetime.datetime(2018, 1, 1, 0, 0)),
|
||||
)
|
||||
resp21 = app.get('/api/agenda/meetings/%s/datetimes/' % meeting_type.id)
|
||||
assert len(resp21.json['data']) == 0
|
||||
full_coverage.delete()
|
||||
|
||||
# with a second desk
|
||||
desk2 = Desk.objects.create(label='Desk 2', agenda=meetings_agenda)
|
||||
time_period = desk.timeperiod_set.first()
|
||||
|
|
Loading…
Reference in New Issue