Esempio n. 1
0
def test_recalculate_maria():
    maria = Product("maria", 1)
    recalculate_quality(maria)
    assert maria.quality == -2
Esempio n. 2
0
def test_recalculate_bread():
    bread = Product("bread", 3)
    recalculate_quality(bread)
    assert bread.quality == 0
Esempio n. 3
0
def test_recalculate_milk():
    milk = Product("milk", 2)
    recalculate_quality(milk)
    assert milk.quality == -1
Esempio n. 4
0
def test_recalculate_olives():
    olives = Product("olives", 9)
    recalculate_quality(olives)
    assert olives.quality == 9
Esempio n. 5
0
def test_recalculate_ham():
    ham = Product("ham", 10)
    recalculate_quality(ham)
    assert ham.quality == 10
Esempio n. 6
0
def test_recalculate_potato():
    potato = Product("potato", 5)
    recalculate_quality(potato)
    assert potato.quality == 4.5
Esempio n. 7
0
def test_recalculate_cheese():
    cheese = Product("cheese", 5)
    recalculate_quality(cheese)
    assert cheese.quality == 3
Esempio n. 8
0
def test_recalculate_leila():
    leila = Product("leila",1)
    recalculate_quality(leila)
    assert leila.quality == -2
Esempio n. 9
0
def test_recalculate_fish():
    fish = Product("fish",1.5)
    recalculate_quality(fish)
    assert fish.quality == -1.5
Esempio n. 10
0
def test_recalculate_chocolate():
    chocolate = Product("chocolate",2)
    recalculate_quality(chocolate)
    assert chocolate.quality == -1
Esempio n. 11
0
def test_recalculate_beer():
    beer = Product("beer",10.95)
    recalculate_quality(beer)
    assert beer.quality == 10.95
Esempio n. 12
0
def test_recalculate_water():
    water = Product("water",5)
    recalculate_quality(water)
    assert water.quality == 5