Esempio n. 1
0
    def setUp(self):
        ingredient = Ingredient.create("Pão")
        Ingredient.set_value(ingredient, 1.25)
        ingredient = Ingredient.create("Hamburger")
        Ingredient.set_value(ingredient, 1)
        ingredient = Ingredient.create("Bacon")
        Ingredient.set_value(ingredient, 2)

        name = "X-Bacon"
        list = ["Pão", "Hamburger", "Bacon"]
        profit = 5.5
        sandwich = Sandwich.create(name, profit, list)

        beverage = Beverage.create("Coca-cola", "2 Litros", 6)
Esempio n. 2
0
def create_execute(name, price):
    ingredient = Ingredient.create(name)
    Ingredient.set_value(ingredient, price)
Esempio n. 3
0
 def test_set_value_ingredient_id_2(self):
     ingredient = Ingredient.get_by_id(2)
     ingredient_value = Ingredient.set_value(ingredient, 1.25)
     self.assertEqual(ingredient_value.value, 1.25)
Esempio n. 4
0
 def test_set_value_ingredient_id_1(self):
     ingredient = Ingredient.get_by_id(1)
     ingredient_value = Ingredient.set_value(ingredient, 1.50)
     self.assertEqual(ingredient_value.value, 1.5)