def test_add_discount(example_book): cart = ShoppingCart() cart.add(example_book) cart.add_discount(COUPONS["10OFF"]) assert cart.total == 9.00