コード例 #1
0
 def test_update_toppings_remove(self):
     pizza = Pizza("pepperoni_pizza", 0, "small")
     pizza.update_toppings("remove", ["tomatoes"])
     assert pizza.toppings == {'pepperoni': 1}
コード例 #2
0
 def test_update_toppings_add(self):
     pizza = Pizza("pepperoni_pizza", 0, "small")
     pizza.update_toppings("add", ["olives"])
     assert pizza.toppings == {'pepperoni': 1, 'tomatoes': 1, 'olives': 1}