Exemple #1
0
 def test_pizza_ordered(self):
     t = PizzaDelivery('Margarita', 12, {'cheese': 2, 'tomatoes': 1})
     result = t.make_order()
     self.assertEqual(t.ordered, True)
     self.assertEqual(
         result,
         "You've ordered pizza Margarita prepared with cheese: 2, tomatoes: 1 and the price will be 12lv."
     )
Exemple #2
0
 def test_add_extra_after_pizza_is_ordered_should_return_message(self):
     t = PizzaDelivery('Margarita', 12, {'cheese': 2, 'tomatoes': 1})
     order = t.make_order()
     result = t.add_extra('mozzarella', 1, 2)
     self.assertEqual(
         order,
         "You've ordered pizza Margarita prepared with cheese: 2, tomatoes: 1 and the price will be 12lv."
     )
     self.assertEqual(
         result,
         "Pizza Margarita already prepared and we can't make any changes!")