@@ -31,14 +31,14 @@ class VoucherTestCases(RegistrationCartTestCase):
cart_2.apply_voucher(voucher.code)
# After the reservation duration
# user 2 should be able to apply voucher
self.add_timedelta(rego.Voucher.RESERVATION_DURATION * 2)
cart_2.cart.active = False
cart_2.cart.save()
cart_2.next_cart()
# After the reservation duration, even though the voucher has applied,
# it exceeds the number of vouchers available.
with self.assertRaises(ValidationError):
cart_1.validate_cart()
@@ -122,14 +122,14 @@ class VoucherTestCases(RegistrationCartTestCase):
def test_voucher_can_only_be_applied_once_across_multiple_carts(self):
voucher = self.new_voucher(limit=2)
current_cart = TestingCartController.for_user(self.USER_1)
current_cart.apply_voucher(voucher.code)
current_cart.cart.active = False
current_cart.cart.save()
current_cart.next_cart()