def order(valid_user): print("These are our restaurants") database.display_restaurants() restaurant = input("Which menu you want to see: ") if database.is_there_such_restaurant(restaurant): database.menu(restaurant) else: print("There is no such restaurant") return False if database.is_open(restaurant): print("This restaurant is currently open!") while True: command = input("Type 'add','remove','ready' or 'exit'>") if command == 'add': add(valid_user, restaurant) elif command == 'remove': remove(valid_user) elif command == 'ready': final_details(valid_user) break elif command == 'exit': break else: print("Wrong command!") else: print("This restaurant is currently not open, sorry")
def test_is_open_opened(self): database.create_menu_table('speedy') database.open('speedy') self.assertTrue(database.is_open('speedy'))
def test_is_open_closed(self): database.create_menu_table('speedy') self.assertFalse(database.is_open('speedy'))