def test_get_dish_not_exists_not_fail(self): """ test about the services restaurant to test the result of deleting a dish that doesn't exist :return: """ new_restaurant = Utils.create_restaurant() new_dish = Utils.create_dish(new_restaurant.id, "Pizza") response = RestaurantService.delete_dish(new_dish.id + 1) assert response is True dish = Utils.get_dish(new_dish.id) assert dish is not None Utils.delete_dish(new_dish.id) Utils.delete_restaurant(new_restaurant.id)
def test_delete_dish_ok(self): """ test about the services restaurant to test the result of deleting a dish :return: """ new_restaurant = Utils.create_restaurant() new_dish = Utils.create_dish(new_restaurant.id, "Pizza") dish = Utils.get_dish(new_dish.id) assert dish is not None response = RestaurantService.delete_dish(new_dish.id) assert response is True dish = Utils.get_dish(new_dish.id) assert dish is None Utils.delete_restaurant(new_restaurant.id)