api: make sure event status API only accepts numbers (#30459)
This commit is contained in:
parent
ed85d7122b
commit
b9a2848a26
|
@ -27,7 +27,7 @@ urlpatterns = [
|
|||
views.fillslot, name='api-fillslot'),
|
||||
url(r'agenda/(?P<agenda_identifier>[\w-]+)/fillslots/$',
|
||||
views.fillslots, name='api-agenda-fillslots'),
|
||||
url(r'agenda/(?P<agenda_identifier>[\w-]+)/status/(?P<event_pk>\w+)/$', views.slot_status,
|
||||
url(r'agenda/(?P<agenda_identifier>[\w-]+)/status/(?P<event_pk>\d+)/$', views.slot_status,
|
||||
name='api-event-status'),
|
||||
|
||||
url(r'agenda/meetings/(?P<meeting_identifier>[\w-]+)/datetimes/$',
|
||||
|
|
|
@ -797,6 +797,7 @@ def test_status(app, some_data, user):
|
|||
|
||||
app.authorization = ('Basic', ('john.doe', 'password'))
|
||||
resp = app.get('/api/agenda/%s/status/%s/' % (agenda_id, 9999), status=404)
|
||||
resp = app.get('/api/agenda/%s/status/%s/' % (agenda_id, 'xx'), status=404)
|
||||
|
||||
resp = app.get('/api/agenda/%s/status/%s/' % (agenda_id, event.id))
|
||||
assert resp.json['err'] == 0
|
||||
|
|
Loading…
Reference in New Issue