def test_add_side(): m = Menu() m.add_side("side-1", 10, inv_item, 1) assert len(m.sides) == 1 assert m.sides[0].name == 'side-1' assert m.sides[0].price == 10 assert m.sides[0].component is inv_item assert m.sides[0].component_qty == 1 assert len(m) == 3
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