Beispiel #1
0
    def test_get_orders(self):
        self.system = GourmetBurgerSystem()

        self.system.create_new_order()
        self.system.create_new_order()

        assert self.system.orders == self.system._order_manager.orders
Beispiel #2
0
    def test_successful_order(self):
        # making an order of every item on the menu
        items = []
        items += self.system.sides
        items += self.system.drinks

        for item in items:
            item.increment(item.quantity_per_serving)

        # creating the order
        self.order_id = self.system.create_new_order()

        order = self.system.get_order_by_id(self.order_id)
        print(self.system._stock_levels)
        order.set_sides(self.system.sides)
        order.set_drinks(self.system.drinks)

        assert order.price == sum([item.price for item in items])
        assert order.status == "selection"
        assert order.sides == tuple(self.system.sides)
        assert order.drinks == tuple(self.system.drinks)

        GourmetBurgerSystem.checkout(order)

        assert order.status == "being prepared"

        #checking the stock levels after placing order
        for (key, (value, units)) in self.system._stock_levels.items():
            assert value == 0
Beispiel #3
0
    def test_creation_ordering_success(self):

        ingredients = item.initialise_ingredients(dict())
        bun = item.initialise_buns(dict())[0]

        self.x = Order(1)

        for ingredient in ingredients:
            ingredient.increment(ingredient.quantity_per_serving * 2)

        bun.increment(bun.quantity_per_serving * 2)

        burger = Burger(ingredients, [bun] * 2)

        wrap = Wrap(ingredients)

        self.x.set_wraps([wrap])
        self.x.set_burgers([burger])

        GourmetBurgerSystem.checkout(self.x)

        assert self.x.status == "being prepared"

        for ingredient in ingredients:
            assert ingredient.stock == 0

        assert bun.stock == 0

        assert self.x.price == wrap.price + burger.price
Beispiel #4
0
    def test_drinks_out_of_stock(self):
        self.x = Order(1)

        drink1 = item.initialise_drinks(dict())[0]
        drink1.stock = drink1.quantity_per_serving - 1

        self.x.set_drinks([drink1])

        # check that checkout out fails
        with pytest.raises(OutOfStockError) as e:
            GourmetBurgerSystem.checkout(self.x)

        assert len(e.value.msg) == 1

        assert drink1.name in e.value.msg

        # check that checking the item list fails
        item_list = [drink1]
        with pytest.raises(OutOfStockError) as e:
            GourmetBurgerSystem.check_item_list(item_list)

        assert len(e.value.msg) == 1

        assert drink1.name in e.value.msg

        assert self.x.drinks == (drink1, )
        assert self.x.price == drink1.price
Beispiel #5
0
 def setup_method(self):
     self.system = GourmetBurgerSystem()
     assert self.system != None
     assert self.system.drinks != None
     assert self.system.sides != None
     assert self.system.ingredients != None
     assert self.system.buns != None
Beispiel #6
0
    def test_two_orders_with_stock(self):
        items = []
        items += self.system.sides
        items += self.system.drinks

        for item in items:
            item.increment(item.quantity_per_serving)
            item.increment(item.quantity_per_serving)

        self.order_id = self.system.create_new_order()
        order1 = self.system.get_order_by_id(self.order_id)
        self.order_id = self.system.create_new_order()
        order2 = self.system.get_order_by_id(self.order_id)
        assert order1 != order2

        # placing order 1 - valid
        order1.set_sides(self.system.sides)
        order1.set_drinks(self.system.drinks)
        assert order1.price == sum([item.price for item in items])
        assert order1.status == "selection"
        assert order1.sides == tuple(self.system.sides)
        assert order1.drinks == tuple(self.system.drinks)
        GourmetBurgerSystem.checkout(order1)
        assert order1.status == "being prepared"

        # placing order 2 - valid
        order2.set_sides(self.system.sides)
        order2.set_drinks(self.system.drinks)
        assert order2.price == sum([item.price for item in items])
        assert order2.status == "selection"
        assert order2.sides == tuple(self.system.sides)
        assert order2.drinks == tuple(self.system.drinks)
        GourmetBurgerSystem.checkout(order2)
        assert order2.status == "being prepared"
Beispiel #7
0
    def test_lookups(self):

        self.system = GourmetBurgerSystem()

        items = (*self.system.sides, *self.system.drinks,
                 *self.system.ingredients, *self.system.buns)

        for item in items:
            assert item == self.system.get_object_by_name(item.name)
Beispiel #8
0
    def test_stock_levels_set(self):

        # Check stock levels setting

        self.system = GourmetBurgerSystem()

        dictionary = {'Nuggets': '3'}

        self.system.update_stock_levels(dictionary)

        assert self.system.stock_levels['Nuggets'] == [3, 'pcs']

        dictionary['Nuggets'] = 4

        assert self.system.stock_levels['Nuggets'] == [3, 'pcs']

        # test attempted insertion of a new key
        dictionary = {'new_key': 0}

        self.system.update_stock_levels(dictionary)

        print(self.system.stock_levels)

        assert 'new_key' not in self.system.stock_levels

        # test invalid alphabet character
        dictionary = {'Nuggets': 'a'}

        with pytest.raises(StockSetterError) as e:
            self.system.update_stock_levels(dictionary)
        assert e.value.errors['Nuggets'] == 'Please enter an integer.'
        assert self.system.stock_levels['Nuggets'] != ['a', 'pcs']
        assert self.system.stock_levels['Nuggets'] == [3, 'pcs']

        # test negative stock level
        dictionary = {'Nuggets': '-1'}

        with pytest.raises(StockSetterError) as e:
            self.system.update_stock_levels(dictionary)
        assert e.value.errors[
            'Nuggets'] == 'Please enter a stock level greater than 0.'
        assert self.system.stock_levels['Nuggets'] != ['-1', 'pcs']
        assert self.system.stock_levels['Nuggets'] == [3, 'pcs']

        # test valid and invalid input
        dictionary = {
            'Nuggets': '-1',
            'Fries': 5,
        }

        with pytest.raises(StockSetterError) as e:
            self.system.update_stock_levels(dictionary)
        assert e.value.errors[
            'Nuggets'] == 'Please enter a stock level greater than 0.'
        assert self.system.stock_levels['Nuggets'] != ['-1', 'pcs']
        assert self.system.stock_levels['Fries'] == [5, 'grams']
Beispiel #9
0
    def test_out_of_stock(self):
        empty_system = GourmetBurgerSystem()
        bun_string_list = ['Sesame bun']
        buns = [
            empty_system.get_object_by_name(bun) for bun in bun_string_list
        ]

        with pytest.raises(OutOfStockError) as e:
            GourmetBurgerSystem.check_item_list(buns)
        assert "Sesame bun" in e.value.msg
Beispiel #10
0
 def test_confirmation_print_out(self):
     items = []
     items += self.system.sides
     for item in items:
         item.increment(item.quantity_per_serving)
     self.order_id = self.system.create_new_order()
     order = self.system.get_order_by_id(self.order_id)
     # print(self.system._stock_levels)
     order.set_sides(self.system.sides)
     GourmetBurgerSystem.checkout(order)
     self.system.print_order(self.order_id)
Beispiel #11
0
    def test_successfully_order_everything(self, system):
        fillings = system.ingredients

        wrap = system.create_wrap(fillings)

        id = system.create_new_order()
        order = system.get_order_by_id(id)
        order.set_wraps([wrap])

        GourmetBurgerSystem.checkout(order)

        assert order.price == wrap.price
Beispiel #12
0
    def test_order_everything(self, system, standard_burger):
        drinks = system.drinks

        id = system.create_new_order()
        order = system.get_order_by_id(id)
        order.set_drinks(drinks)
        order.set_burgers([standard_burger])

        GourmetBurgerSystem.checkout(order)

        assert order.price == sum([drink.price for drink in system.drinks
                                   ]) + standard_burger.price
Beispiel #13
0
def create_order(items_dict):
    mains = SessionManager.fetch_items()
    id = system.create_new_order()
    order = system.get_order_by_id(id)
    burgers = [w for w in mains if type(w).__name__ == 'burger']
    wraps = [w for w in mains if not type(w).__name__ == 'burger']
    order.set_burgers(burgers)
    order.set_wraps(wraps)
    order.set_sides(items_dict['sides_list'])
    order.set_drinks(items_dict['drinks_list'])
    GourmetBurgerSystem.checkout(order)
    return id
Beispiel #14
0
    def test_order_everything(self, system, standard_burger):
        sides = system.sides

        id = system.create_new_order()
        order = system.get_order_by_id(id)
        order.set_sides(sides)
        order.set_burgers([standard_burger])

        GourmetBurgerSystem.checkout(order)

        assert order.price == sum([side.price for side in system.sides
                                   ]) + standard_burger.price
Beispiel #15
0
    def test_successfully_order_everything(self, system):
        bun_string_list = ['Muffin bun'] * 2
        buns = [system.get_object_by_name(bun) for bun in bun_string_list]
        fillings = system.ingredients

        burger = system.create_burger(fillings, buns)

        id = system.create_new_order()
        order = system.get_order_by_id(id)
        order.set_burgers([burger])

        GourmetBurgerSystem.checkout(order)

        assert order.price == burger.price
Beispiel #16
0
    def test_order_buns_and_wraps(self, system):
        fillings = system.ingredients
        sesame_bun = system.buns[0]

        wrap1 = system.create_wrap(fillings)
        wrap2 = system.create_wrap(fillings[:-1])

        burger1 = system.create_burger(fillings, [sesame_bun] * 2)
        burger2 = system.create_burger(fillings[:-1], [sesame_bun] * 2)

        id = system.create_new_order()
        order = system.get_order_by_id(id)
        order.set_wraps([wrap1, wrap2])
        order.set_burgers([burger1, burger2])

        GourmetBurgerSystem.checkout(order)

        assert order.price == wrap1.price + wrap2.price + burger1.price + burger2.price
Beispiel #17
0
    def test_creation_out_of_stock(self):

        ingredients = item.initialise_ingredients(dict())
        bun = item.initialise_buns(dict())[0]

        self.x = Order(1)

        for ingredient in ingredients:
            ingredient.increment(ingredient.quantity_per_serving)

        bun.increment(bun.quantity_per_serving)

        burger = Burger(ingredients, [bun] * 2)

        wrap = Wrap(ingredients)

        self.x.set_wraps([wrap])
        self.x.set_burgers([burger])

        # check that checking out fails
        with pytest.raises(OutOfStockError) as e:
            GourmetBurgerSystem.checkout(self.x)

        assert len(e.value.msg) == len(ingredients) + 1

        for ingredient in ingredients:
            assert ingredient.name in e.value.msg

        assert bun.name in e.value.msg

        #check that checking the item list fails
        item_list = list(wrap.ingredients) + list(
            burger.ingredients) + burger.number_of_buns * [burger.bun]
        with pytest.raises(OutOfStockError) as e:
            GourmetBurgerSystem.check_item_list(item_list)

        assert len(e.value.msg) == len(ingredients) + 1

        for ingredient in ingredients:
            assert ingredient.name in e.value.msg

        assert bun.name in e.value.msg
Beispiel #18
0
    def test_two_orders_when_stock_runs_out(self):
        items = []
        items += self.system.sides
        items += self.system.drinks

        for item in items:
            item.increment(item.quantity_per_serving)

        self.order_id = self.system.create_new_order()
        order1 = self.system.get_order_by_id(self.order_id)
        self.order_id = self.system.create_new_order()
        order2 = self.system.get_order_by_id(self.order_id)
        assert order1 != order2

        # placing order 1 - valid
        order1.set_sides(self.system.sides)
        order1.set_drinks(self.system.drinks)
        assert order1.price == sum([item.price for item in items])
        assert order1.status == "selection"
        assert order1.sides == tuple(self.system.sides)
        assert order1.drinks == tuple(self.system.drinks)
        GourmetBurgerSystem.checkout(order1)
        assert order1.status == "being prepared"

        # placing order 2 - not valid
        try:
            order2.set_sides(self.system.sides)
        except OutOfStockError as e:
            assert "Large Fries" in e.msg

        try:
            order2.set_drinks(self.system.drinks)
        except OutOfStockError as e:
            assert "Large Orange Juice" in e.msg

        assert order2.status == "selection"
Beispiel #19
0
def check_errors(items_dict, mains, action, adding_main):
    errors = {}
    items_required = []
    for main in mains:
        items_required += main.items

    if "Add Main" == action:
        if adding_main == 'custom_burger':
            items_required += items_dict['ingredients_list'] + items_dict[
                'buns_list']
            try:
                system.create_burger(items_dict['ingredients_list'],
                                     items_dict['buns_list'])
            except InvalidOrderError as e:
                errors['head'] = 'Invalid burger: ' + e.msg
        elif adding_main == 'custom_wrap':
            items_required += items_dict['ingredients_list']
            try:
                system.create_wrap(items_dict['ingredients_list'])
            except InvalidOrderError as e:
                errors['head'] = 'Invalid wrap: ' + e.msg
        elif adding_main == 'standard_burger':
            items_required += system.standard_burger.items
        elif adding_main == 'standard_wrap':
            items_required += system.standard_wrap.items

    else:
        items_required += items_dict['drinks_list'] + items_dict['sides_list']

    try:
        GourmetBurgerSystem.check_item_list(items_required)
    except OutOfStockError as e:
        for item in e.msg:
            errors[item] = item + ' out of stock.'

    return errors
Beispiel #20
0
    def test_out_of_stock(self, standard_burger):
        empty_system = GourmetBurgerSystem()

        drinks = empty_system.drinks

        id = empty_system.create_new_order()
        order = empty_system.get_order_by_id(id)
        order.set_drinks(drinks)
        order.set_burgers([standard_burger])

        with pytest.raises(OutOfStockError) as e:
            GourmetBurgerSystem.checkout(order)
        assert e.value.msg == [item.name for item in empty_system.drinks]
Beispiel #21
0
from flask import Flask
from gourmet_burger_system import GourmetBurgerSystem

system = GourmetBurgerSystem.load()

app = Flask(__name__)
app.secret_key = 'very-secret-123'  # Used to add entropy
Beispiel #22
0
from gourmet_burger_system import GourmetBurgerSystem

system = GourmetBurgerSystem()

updated_stock_levels = {}

for key in system.stock_levels:
    updated_stock_levels[key] = 100000

system.update_stock_levels(updated_stock_levels)
system.save()
Beispiel #23
0
class TestSystem:
    def setup_method(self):
        self.system = GourmetBurgerSystem()
        assert self.system != None
        assert self.system.drinks != None
        assert self.system.sides != None
        assert self.system.ingredients != None
        assert self.system.buns != None

    def test_create_new_order(self):
        self.order_id = self.system.create_new_order()
        assert self.order_id != None
        assert self.order_id == '0'

    def test_order_exists(self):
        self.order_id = self.system.create_new_order()
        assert self.system.id_exists(self.order_id)
        assert self.system.id_exists("100") == False

    def test_successful_order(self):
        # making an order of every item on the menu
        items = []
        items += self.system.sides
        items += self.system.drinks

        for item in items:
            item.increment(item.quantity_per_serving)

        # creating the order
        self.order_id = self.system.create_new_order()

        order = self.system.get_order_by_id(self.order_id)
        print(self.system._stock_levels)
        order.set_sides(self.system.sides)
        order.set_drinks(self.system.drinks)

        assert order.price == sum([item.price for item in items])
        assert order.status == "selection"
        assert order.sides == tuple(self.system.sides)
        assert order.drinks == tuple(self.system.drinks)

        GourmetBurgerSystem.checkout(order)

        assert order.status == "being prepared"

        #checking the stock levels after placing order
        for (key, (value, units)) in self.system._stock_levels.items():
            assert value == 0

    def test_staff_update_order(self):
        self.order_id = self.system.create_new_order()
        order = self.system.get_order_by_id(self.order_id)
        assert order.status == "selection"
        order.status = "ready"

        assert order.status == "ready"

    def test_customer_check_order(self):
        self.order_id = self.system.create_new_order()
        order = self.system.get_order_by_id(self.order_id)

        print(order)

    def test_stock_shortage(self):
        # set stock levels to the minimum ammount required to order all sides and drinks on the menu
        items = []
        items += self.system.sides
        items += self.system.drinks

        for item in items:
            item.increment(1)

        for item in items:
            if item.name == "Large Fries":
                item.stock = item.stock - 1
            if item.name == "Large Orange Juice":
                item.stock = item.stock - 1

        self.order_id = self.system.create_new_order()

        order = self.system.get_order_by_id(self.order_id)

        try:
            order.set_sides(self.system.sides)
        except OutOfStockError as e:
            assert "Large Fries" in e.msg

        try:
            order.set_drinks(self.system.drinks)
        except OutOfStockError as e:
            assert "Large Orange Juice" in e.msg

    def test_two_orders_with_stock(self):
        items = []
        items += self.system.sides
        items += self.system.drinks

        for item in items:
            item.increment(item.quantity_per_serving)
            item.increment(item.quantity_per_serving)

        self.order_id = self.system.create_new_order()
        order1 = self.system.get_order_by_id(self.order_id)
        self.order_id = self.system.create_new_order()
        order2 = self.system.get_order_by_id(self.order_id)
        assert order1 != order2

        # placing order 1 - valid
        order1.set_sides(self.system.sides)
        order1.set_drinks(self.system.drinks)
        assert order1.price == sum([item.price for item in items])
        assert order1.status == "selection"
        assert order1.sides == tuple(self.system.sides)
        assert order1.drinks == tuple(self.system.drinks)
        GourmetBurgerSystem.checkout(order1)
        assert order1.status == "being prepared"

        # placing order 2 - valid
        order2.set_sides(self.system.sides)
        order2.set_drinks(self.system.drinks)
        assert order2.price == sum([item.price for item in items])
        assert order2.status == "selection"
        assert order2.sides == tuple(self.system.sides)
        assert order2.drinks == tuple(self.system.drinks)
        GourmetBurgerSystem.checkout(order2)
        assert order2.status == "being prepared"

    def test_two_orders_when_stock_runs_out(self):
        items = []
        items += self.system.sides
        items += self.system.drinks

        for item in items:
            item.increment(item.quantity_per_serving)

        self.order_id = self.system.create_new_order()
        order1 = self.system.get_order_by_id(self.order_id)
        self.order_id = self.system.create_new_order()
        order2 = self.system.get_order_by_id(self.order_id)
        assert order1 != order2

        # placing order 1 - valid
        order1.set_sides(self.system.sides)
        order1.set_drinks(self.system.drinks)
        assert order1.price == sum([item.price for item in items])
        assert order1.status == "selection"
        assert order1.sides == tuple(self.system.sides)
        assert order1.drinks == tuple(self.system.drinks)
        GourmetBurgerSystem.checkout(order1)
        assert order1.status == "being prepared"

        # placing order 2 - not valid
        try:
            order2.set_sides(self.system.sides)
        except OutOfStockError as e:
            assert "Large Fries" in e.msg

        try:
            order2.set_drinks(self.system.drinks)
        except OutOfStockError as e:
            assert "Large Orange Juice" in e.msg

        assert order2.status == "selection"

    def test_confirmation_print_out(self):
        items = []
        items += self.system.sides
        for item in items:
            item.increment(item.quantity_per_serving)
        self.order_id = self.system.create_new_order()
        order = self.system.get_order_by_id(self.order_id)
        # print(self.system._stock_levels)
        order.set_sides(self.system.sides)
        GourmetBurgerSystem.checkout(order)
        self.system.print_order(self.order_id)

    def test_stock_levels_set(self):

        # Check stock levels setting

        self.system = GourmetBurgerSystem()

        dictionary = {'Nuggets': '3'}

        self.system.update_stock_levels(dictionary)

        assert self.system.stock_levels['Nuggets'] == [3, 'pcs']

        dictionary['Nuggets'] = 4

        assert self.system.stock_levels['Nuggets'] == [3, 'pcs']

        # test attempted insertion of a new key
        dictionary = {'new_key': 0}

        self.system.update_stock_levels(dictionary)

        print(self.system.stock_levels)

        assert 'new_key' not in self.system.stock_levels

        # test invalid alphabet character
        dictionary = {'Nuggets': 'a'}

        with pytest.raises(StockSetterError) as e:
            self.system.update_stock_levels(dictionary)
        assert e.value.errors['Nuggets'] == 'Please enter an integer.'
        assert self.system.stock_levels['Nuggets'] != ['a', 'pcs']
        assert self.system.stock_levels['Nuggets'] == [3, 'pcs']

        # test negative stock level
        dictionary = {'Nuggets': '-1'}

        with pytest.raises(StockSetterError) as e:
            self.system.update_stock_levels(dictionary)
        assert e.value.errors[
            'Nuggets'] == 'Please enter a stock level greater than 0.'
        assert self.system.stock_levels['Nuggets'] != ['-1', 'pcs']
        assert self.system.stock_levels['Nuggets'] == [3, 'pcs']

        # test valid and invalid input
        dictionary = {
            'Nuggets': '-1',
            'Fries': 5,
        }

        with pytest.raises(StockSetterError) as e:
            self.system.update_stock_levels(dictionary)
        assert e.value.errors[
            'Nuggets'] == 'Please enter a stock level greater than 0.'
        assert self.system.stock_levels['Nuggets'] != ['-1', 'pcs']
        assert self.system.stock_levels['Fries'] == [5, 'grams']

    def test_get_orders(self):
        self.system = GourmetBurgerSystem()

        self.system.create_new_order()
        self.system.create_new_order()

        assert self.system.orders == self.system._order_manager.orders

    def test_lookups(self):

        self.system = GourmetBurgerSystem()

        items = (*self.system.sides, *self.system.drinks,
                 *self.system.ingredients, *self.system.buns)

        for item in items:
            assert item == self.system.get_object_by_name(item.name)
Beispiel #24
0
def standard_order(system, standard_burger):
    id = system.create_new_order()
    order = system.get_order_by_id(id)
    order.burger = standard_burger
    GourmetBurgerSystem.checkout(order)
    return order
Beispiel #25
0
    def test_decrement_stock(self, system):
        drinks = system.drinks
        sides = system.sides

        id = system.create_new_order()
        order = system.get_order_by_id(id)
        order.set_drinks(drinks)
        order.set_sides(sides)

        bun_string_list = ['Muffin bun'] * 2
        buns = [system.get_object_by_name(bun) for bun in bun_string_list]
        fillings = system.ingredients

        burger = system.create_burger(fillings, buns)

        order.set_burgers([burger])

        GourmetBurgerSystem.checkout(order)

        #test burger stock decremented correctly
        assert buns[0].stock == 10000 - 2 * buns[0].quantity_per_serving
        for filling in fillings:
            assert filling.stock == 10000 - filling.quantity_per_serving

        #test whether sides decremented correctly
        (lf, mf, sf, n20, n10, n6, n3, lcs, mcs, scs, lss, msm,
         sss) = system.sides
        assert lf.stock == mf.stock == sf.stock
        assert sf.stock == 10000 - lf.quantity_per_serving - mf.quantity_per_serving - sf.quantity_per_serving

        assert n20.stock == n10.stock == n6.stock == n3.stock
        assert n3.stock == 10000 - n20.quantity_per_serving - n10.quantity_per_serving - n6.quantity_per_serving - n3.quantity_per_serving

        assert lcs.stock == 10000 - lcs.quantity_per_serving
        assert mcs.stock == 10000 - mcs.quantity_per_serving
        assert scs.stock == 10000 - scs.quantity_per_serving
        assert lss.stock == 10000 - lss.quantity_per_serving
        assert msm.stock == 10000 - msm.quantity_per_serving
        assert sss.stock == 10000 - sss.quantity_per_serving

        #test whether drinks decremented correctly
        (loj, moj, soj, laj, maj, saj, lcj, mcj, scj, lpj, mpj, spj, c600,
         c350, s600, s350, l600, l350) = system.drinks

        assert loj.stock == moj.stock == soj.stock
        assert soj.stock == 10000 - loj.quantity_per_serving - moj.quantity_per_serving - soj.quantity_per_serving

        assert laj.stock == maj.stock == saj.stock
        assert saj.stock == 10000 - laj.quantity_per_serving - maj.quantity_per_serving - saj.quantity_per_serving

        assert lcj.stock == mcj.stock == scj.stock
        assert scj.stock == 10000 - lcj.quantity_per_serving - mcj.quantity_per_serving - scj.quantity_per_serving

        assert lpj.stock == mpj.stock == spj.stock
        assert spj.stock == 10000 - lpj.quantity_per_serving - mpj.quantity_per_serving - spj.quantity_per_serving

        assert c600.stock == 10000 - c600.quantity_per_serving
        assert c350.stock == 10000 - c350.quantity_per_serving

        assert s600.stock == 10000 - s600.quantity_per_serving
        assert s350.stock == 10000 - s350.quantity_per_serving

        assert l600.stock == 10000 - l600.quantity_per_serving
        assert l350.stock == 10000 - l350.quantity_per_serving
Beispiel #26
0
def system():
    system = GourmetBurgerSystem()
    for (key, (value, units)) in system._stock_levels.items():
        system._stock_levels[key] = [10000, units]
    return system