Ejemplo n.º 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)]
Ejemplo n.º 2
0
def test_updatePrice_4():
    assert updatePrice(-50, [i2, i4]) == [Item('Milk', 2.00, 0),
                                          Item('Orange', 0.50, 0)]
Ejemplo n.º 3
0
def test_updatePrice_2():
    assert updatePrice(50, [i3, i4]) == [Item('Honey', 4.50, 3),
                                         Item('Orange', 1.50, 0)]
Ejemplo n.º 4
0
def test_updatePrice_3():
    assert updatePrice(0, [i1, i3]) == [Item('Eggs', 2.00, 2),
                                       Item('Honey', 3.00, 3)]
Ejemplo n.º 5
0
def test_updatePrice_1():
    assert updatePrice(100, [i1, i2]) == [Item('Eggs', 4.00, 2),
                                          Item('Milk', 8.00, 0)]