-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.py
28 lines (20 loc) · 802 Bytes
/
tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! python3
"""Tests for the Restaurant and order classes"""
from restaurants import Restaurant, Order, OrderStatus
def test_restaurant() -> None:
BagBite = Restaurant("BagBite")
print("Restaurant: BagBite")
print(f"Name: {BagBite.get_name()}")
print(f"Items: {BagBite.get_items()}")
print(f"Opening Hours: {BagBite.get_opening_hours()}")
print(f"Orders: {BagBite.orders_list}")
def test_order() -> None:
BagBite = Restaurant("BagBite")
my_order1 = Order("Sindre")
my_order1.add_item("Pizza", BagBite.get_items())
my_order1.set_status(OrderStatus.IN_PROGRESS)
my_order = Order("John", ["Burger", "Fries"], BagBite.get_items())
BagBite.add_order(my_order)
BagBite.add_order(my_order1)
for order in BagBite.orders_list:
print(order)