diff --git a/registrasion/tests/test_flag.py b/registrasion/tests/test_flag.py index 3d8914a1586b5657273d9e8e5fc51eca65190272..0b446c262e7994c5fc97686ee950724b1bf8d980 100644 --- a/registrasion/tests/test_flag.py +++ b/registrasion/tests/test_flag.py @@ -382,3 +382,15 @@ class FlagTestCases(RegistrationCartTestCase): with self.assertRaises(ValidationError): cart2.add_to_cart(self.PROD_1, 1) + + def test_flag_failures_only_break_affected_products(self): + ''' If a flag fails, it should only affect its own products. ''' + + self.add_product_flag() + cart1 = TestingCartController.for_user(self.USER_1) + cart1.add_to_cart(self.PROD_2, 1) + cart1.add_to_cart(self.PROD_1, 1) + cart1.set_quantity(self.PROD_2, 0) + + # The following should not fail, as PROD_3 is not affected by flag. + cart1.add_to_cart(self.PROD_3, 1)