api: include delays in agenda API (#29847)
This commit is contained in:
parent
c348df5ff3
commit
b3a284d825
|
@ -93,6 +93,8 @@ def get_agenda_detail(request, agenda):
|
|||
'slug': agenda.slug, # kept for compatibility
|
||||
'text': agenda.label,
|
||||
'kind': agenda.kind,
|
||||
'minimal_booking_delay': agenda.minimal_booking_delay,
|
||||
'maximal_booking_delay': agenda.maximal_booking_delay,
|
||||
}
|
||||
|
||||
if agenda.kind == 'events':
|
||||
|
|
|
@ -100,9 +100,11 @@ def test_agendas_api(app, some_data, meetings_agenda):
|
|||
resp = app.get('/api/agenda/')
|
||||
assert resp.json == {'data': [
|
||||
{'text': 'Foo bar', 'id': u'foo-bar', 'slug': 'foo-bar', 'kind': 'events',
|
||||
'minimal_booking_delay': 1, 'maximal_booking_delay': 56,
|
||||
'api': {'datetimes_url': 'http://testserver/api/agenda/%s/datetimes/' % agenda1.slug,
|
||||
'fillslots_url': 'http://testserver/api/agenda/%s/fillslots/' % agenda1.slug}},
|
||||
{'text': 'Foo bar Meeting', 'id': u'foo-bar-meeting', 'slug': 'foo-bar-meeting',
|
||||
'minimal_booking_delay': 1, 'maximal_booking_delay': 56,
|
||||
'kind': 'meetings',
|
||||
'api': {'meetings_url': 'http://testserver/api/agenda/%s/meetings/' % meetings_agenda.slug,
|
||||
'desks_url': 'http://testserver/api/agenda/%s/desks/' % meetings_agenda.slug,
|
||||
|
@ -110,6 +112,7 @@ def test_agendas_api(app, some_data, meetings_agenda):
|
|||
},
|
||||
},
|
||||
{'text': 'Foo bar2', 'id': u'foo-bar2', 'kind': 'events', 'slug': 'foo-bar2',
|
||||
'minimal_booking_delay': 1, 'maximal_booking_delay': 56,
|
||||
'api': {'datetimes_url': 'http://testserver/api/agenda/%s/datetimes/' % agenda2.slug,
|
||||
'fillslots_url': 'http://testserver/api/agenda/%s/fillslots/' % agenda2.slug}}
|
||||
]}
|
||||
|
|
Loading…
Reference in New Issue