Пример #1
0
def test_updatePrice_5():
    assert updatePrice(-100, [i1, i2, i3, i4]) == [Item('Eggs', 0.00, 2),
                                                   Item('Milk', 0.00, 0),
                                                   Item('Honey', 0.00, 3),
                                                   Item('Orange', 0.00, 0)]
Пример #2
0
def test_updatePrice_4():
    assert updatePrice(-50, [i2, i4]) == [Item('Milk', 2.00, 0),
                                          Item('Orange', 0.50, 0)]
Пример #3
0
def test_updatePrice_2():
    assert updatePrice(50, [i3, i4]) == [Item('Honey', 4.50, 3),
                                         Item('Orange', 1.50, 0)]
Пример #4
0
def test_updatePrice_3():
    assert updatePrice(0, [i1, i3]) == [Item('Eggs', 2.00, 2),
                                       Item('Honey', 3.00, 3)]
Пример #5
0
def test_updatePrice_1():
    assert updatePrice(100, [i1, i2]) == [Item('Eggs', 4.00, 2),
                                          Item('Milk', 8.00, 0)]