def test_can_filter_post_order_actions(self): result = models.PostOrderAction("Something will happen") self.applications.add(self.offer, result) self.assertEqual(1, len(self.applications.post_order_actions))
def apply(self, basket, condition, offer=None): condition.consume_items(basket, ()) return models.PostOrderAction( "You will have your name changed to Barry!")
def apply(self, basket, condition, offer): condition.consume_items(offer, basket, ()) return models.PostOrderAction( "Something will happen")