def test_get_price_infos(rf): (request, products, price) = initialize_test(rf) pis = get_price_infos(request, products) assert set(pis.keys()) == set(x.id for x in products) pi1 = pis[products[0].id] pi2 = pis[products[1].id] assert pi1.price == price(90) assert pi1.base_price == price(120) assert pi2.price == price(135) assert pi2.base_price == price(180)