def test_add_bun(): m = Menu() m.add_bun("bun-1", 10, inv_item, 1) assert len(m.buns) == 1 assert m.buns[0].name == 'bun-1' assert m.buns[0].price == 10 assert m.buns[0].component is inv_item assert m.buns[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