diff --git a/registrasion/tests/test_voucher.py b/registrasion/tests/test_voucher.py index d4614efb18f17c8cd26b7de8dd713c4de5add378..5f1e07f0455021be230969dc14755c5cb4eb55f8 100644 --- a/registrasion/tests/test_voucher.py +++ b/registrasion/tests/test_voucher.py @@ -58,14 +58,14 @@ class VoucherTestCases(RegistrationCartTestCase): def test_voucher_enables_item(self): voucher = self.new_voucher() - enabling_condition = rego.VoucherEnablingCondition.objects.create( + flag = rego.VoucherFlag.objects.create( description="Voucher condition", voucher=voucher, - mandatory=False, + condition=rego.FlagBase.ENABLE_IF_TRUE, ) - enabling_condition.save() - enabling_condition.products.add(self.PROD_1) - enabling_condition.save() + flag.save() + flag.products.add(self.PROD_1) + flag.save() # Adding the product without a voucher will not work current_cart = TestingCartController.for_user(self.USER_1)