mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Allow sale of blocked seats on specific channels (#1518)
* Allow sale of blocked seats on specific channels * Add docs
This commit is contained in:
@@ -2741,6 +2741,24 @@ def test_order_create_with_seat(token_client, organizer, event, item, quota, sea
|
||||
assert p.seat == seat
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_order_create_with_blocked_seat_allowed(token_client, organizer, event, item, quota, seat, question):
|
||||
seat.blocked = True
|
||||
seat.save()
|
||||
res = copy.deepcopy(ORDER_CREATE_PAYLOAD)
|
||||
res['positions'][0]['item'] = item.pk
|
||||
res['positions'][0]['seat'] = seat.seat_guid
|
||||
res['positions'][0]['answers'][0]['question'] = question.pk
|
||||
res['sales_channel'] = 'bar'
|
||||
event.settings.seating_allow_blocked_seats_for_channel = ['bar']
|
||||
resp = token_client.post(
|
||||
'/api/v1/organizers/{}/events/{}/orders/'.format(
|
||||
organizer.slug, event.slug
|
||||
), format='json', data=res
|
||||
)
|
||||
assert resp.status_code == 201
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_order_create_with_blocked_seat(token_client, organizer, event, item, quota, seat, question):
|
||||
seat.blocked = True
|
||||
|
||||
Reference in New Issue
Block a user