mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Allow to create vouchers for *all* products (#1504)
This commit is contained in:
@@ -717,6 +717,14 @@ class VoucherTestCase(BaseQuotaTestCase):
|
||||
self.assertTrue(v.applies_to(self.var1.item, self.var1))
|
||||
self.assertFalse(v.applies_to(self.var1.item, self.var2))
|
||||
|
||||
@classscope(attr='o')
|
||||
def test_voucher_applicability_all(self):
|
||||
v = Voucher.objects.create(event=self.event)
|
||||
self.assertTrue(v.applies_to(self.item1))
|
||||
self.assertTrue(v.applies_to(self.var1.item))
|
||||
self.assertTrue(v.applies_to(self.var1.item, self.var1))
|
||||
self.assertTrue(v.applies_to(self.var1.item, self.var2))
|
||||
|
||||
@classscope(attr='o')
|
||||
def test_voucher_applicability_variation_through_quota(self):
|
||||
self.quota.variations.add(self.var1)
|
||||
|
||||
Reference in New Issue
Block a user