Exemple #1
0
def test_item_price_with_discount() -> None:
    item = Item("Beer")
    catalogue = {Item("Beer"): 1.00}
    discounts = {(Item("Beer"), ): 0.5}
    assert item.calculate_price(catalogue, discounts) == 0.5
Exemple #2
0
def test_item_price() -> None:
    item = Item("Beer")
    catalogue = {Item("Beer"): 1.00}
    assert item.calculate_price(catalogue, {}) == 1.00