def test_voucher_no_item_but_variation(self): with self.assertRaises(ValidationError): v = Voucher(variation=self.var1, event=self.event) v.clean()
def test_voucher_item_does_not_match_variation(self): with self.assertRaises(ValidationError): v = Voucher(item=self.item2, variation=self.var3, event=self.event) v.clean()
def test_voucher_specify_variation_for_block_quota(self): with self.assertRaises(ValidationError): v = Voucher(item=self.item2, block_quota=True, event=self.event) v.clean()
def test_voucher_no_item_with_quota(self): with self.assertRaises(ValidationError): v = Voucher(quota=self.quota, item=self.item1, event=self.event) v.clean()