def test_get_dishes_not_exists(self): """ test about the services restaurant to test the result of get dishes of a restaurant with no dishes :return: """ new_restaurant = Utils.create_restaurant() dishes = RestaurantService.get_dishes(new_restaurant.id) assert len(dishes) == 0 Utils.delete_restaurant(new_restaurant.id)
def test_get_dishes_ok(self): """ test about the services restaurant to test the result of get dishes of a restaurant :return: """ new_restaurant = Utils.create_restaurant() new_dish1 = Utils.create_dish(new_restaurant.id, "Pizza") new_dish2 = Utils.create_dish(new_restaurant.id, "Pasta") dishes = RestaurantService.get_dishes(new_restaurant.id) assert len(dishes) == 2 Utils.delete_dish(new_dish1.id) Utils.delete_dish(new_dish2.id) Utils.delete_restaurant(new_restaurant.id)