def test_get_table_not_exists_not_fail(self): """ test about the services restaurant to test the result of deleting a table that doesn't exist :return: """ new_restaurant = Utils.create_restaurant() new_table = Utils.create_table(new_restaurant.id) response = RestaurantService.delete_table(new_table.id + 1) assert response is True table = Utils.get_table(new_table.id) assert table is not None Utils.delete_table(new_table.id) Utils.delete_restaurant(new_restaurant.id)
def test_delete_table_ok(self): """ test about the services restaurant to test the result of deleting a table :return: """ new_restaurant = Utils.create_restaurant() new_table = Utils.create_table(new_restaurant.id) table = Utils.get_table(new_table.id) assert table is not None response = RestaurantService.delete_table(new_table.id) assert response is True table = Utils.get_table(new_table.id) assert table is None Utils.delete_restaurant(new_restaurant.id)