def test_buy_product_with_insufficient_funds(): """ test buy product with insufficient funds """ machine = vending_machine.VendingMachine() dime = coins.Dime() nickel = coins.Nickel() machine.insert_coin(dime) machine.insert_coin(nickel) drink = products.Drink() with pytest.raises(InsufficientFunds): machine.buy_product(drink)
def test_drink_str(): """test drink str""" drink = products.Drink() assert str(drink) == "Drink: $2.75"
def test_drink_str(): drink = products.Drink() assert str(drink) == 'Drink: $2.75'
def test_drink_price(): """test drink price""" drink = products.Drink() assert drink.price == 275
def test_drink_price(): drink = products.Drink() assert drink.price == 275