def test_create_soda_machine_with_invalid_params(drink_name, amount, price):
    with pytest.raises(Exception):
        SodaMachine.start([(drink_name, amount, price)])
def soda_machine():
    return SodaMachine.start([("Coke", 10, 10)], "visa_server", "username",
                             "password")
def test_create_soda_machine():
    machine = SodaMachine.start([("Coke", 10, 10)], "visa_server", "username",
                                "password")
    assert "Coke" in machine.drinks, "Coke is missing in machine"
    assert machine.drinks["Coke"].price == 10, "Wrong price was set to Coke"
    assert machine.drinks["Coke"].amount == 10, "Wrong amount was set to Coke"