Improvements around the waiting list (#2219)

* Waiting list: Support for seated events, pre-fill customer email address

* Allow people to remove themselves

* Update src/pretix/base/settings.py

Co-authored-by: Richard Schreiber <schreiber@rami.io>

* Update src/pretix/control/views/waitinglist.py

Co-authored-by: Richard Schreiber <schreiber@rami.io>

* Update src/pretix/control/views/waitinglist.py

Co-authored-by: Richard Schreiber <schreiber@rami.io>

* Update src/pretix/control/views/waitinglist.py

Co-authored-by: Richard Schreiber <schreiber@rami.io>

* Update src/pretix/presale/views/waiting.py

Co-authored-by: Richard Schreiber <schreiber@rami.io>

* Resolve a review note

* Review notes

* Fix linter issues

* Fix import

Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
Raphael Michel
2021-09-27 20:48:02 +02:00
committed by GitHub
parent a9a4cf6fca
commit 9f2ffc3276
15 changed files with 359 additions and 62 deletions

View File

@@ -68,6 +68,25 @@ class WaitingListTestCase(TestCase):
with self.assertRaises(WaitingListException):
wle.send_voucher()
@classscope(attr='o')
def test_send_no_seat(self):
self.quota.items.add(self.item1)
self.quota.size = 10
self.quota.save()
self.event.seat_category_mappings.create(
layout_category='Stalls', product=self.item1
)
self.event.seats.create(seat_number="Foo", product=self.item1, seat_guid="Foo", blocked=True)
self.event.seats.create(seat_number="Bar", product=self.item1, seat_guid="Bar", blocked=True)
self.event.seats.create(seat_number="Baz", product=self.item1, seat_guid="Baz", blocked=True)
wle = WaitingListEntry.objects.create(
event=self.event, item=self.item1, email='foo@bar.com'
)
with self.assertRaises(WaitingListException):
wle.send_voucher()
self.event.seats.create(seat_number="Baz", product=self.item1, seat_guid="Baz", blocked=False)
wle.send_voucher()
@classscope(attr='o')
def test_send_double(self):
self.quota.variations.add(self.var1)