mirror of
https://github.com/pretix/pretix.git
synced 2026-08-19 12:16:26 +00:00
API: Disable endpoints that should have never existed (#6431)
This commit is contained in:
@@ -1164,6 +1164,22 @@ def test_event_update_seating(token_client, organizer, event, item, seatingplan)
|
||||
assert all(seat['product'] == item.pk for seat in resp.data['results'])
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_event_no_create_or_delete_seats(token_client, organizer, event, item, seatingplan):
|
||||
resp = token_client.post(
|
||||
'/api/v1/organizers/{}/events/{}/seats/'.format(organizer.slug, event.slug),
|
||||
{
|
||||
'blocked': False,
|
||||
},
|
||||
format='json'
|
||||
)
|
||||
assert resp.status_code == 405
|
||||
resp = token_client.delete(
|
||||
'/api/v1/organizers/{}/events/{}/seats/3/'.format(organizer.slug, event.slug),
|
||||
)
|
||||
assert resp.status_code == 405
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_event_update_seating_invalid_product(token_client, organizer, event, item, seatingplan):
|
||||
resp = token_client.patch(
|
||||
|
||||
Reference in New Issue
Block a user