Beispiel #1
0
def test_add_other():
    m = Menu()
    m.add_other("other-1", 10, inv_item, 1)
    assert m.other_ingredients[0].name == 'other-1'
    assert m.other_ingredients[0].price == 10
    assert m.other_ingredients[0].component is inv_item
    assert m.other_ingredients[0].component_qty == 1
    assert len(m.other_ingredients) == 1
    assert len(m) == 3
Beispiel #2
0
def menu_fixture():
    MenuItem._reset_id_count()
    m = Menu()
    m.add_side("side", 10, inv_item, 1)
    m.add_drink("drink", 10, inv_item, 1)
    m.add_patty("patty", 10, inv_item, 1)
    m.add_other("other", 10, inv_item, 1)
    m.add_bun("bun", 10, inv_item, 1)

    return m