def test_get_menu_ok(self): """ test about the services restaurant to test the result of get a menu :return: """ new_restaurant = Utils.create_restaurant() new_menu = Utils.create_menu(new_restaurant.id, "Italian food") menu = RestaurantService.get_menu(new_menu.id) assert menu is not None assert menu.cusine == "Italian food" Utils.delete_menu(new_menu.id) Utils.delete_restaurant(new_restaurant.id)
def test_get_menu_not_exists(self): """ test about the services restaurant to test the result of get a menu that doesn't exist :return: """ new_restaurant = Utils.create_restaurant() new_menu = Utils.create_menu(new_restaurant.id, "Italian food") menu = RestaurantService.get_menu(new_menu.id + 2) assert menu is None Utils.delete_menu(new_menu.id) Utils.delete_restaurant(new_restaurant.id)