def test_should_update_recipe_without_ingredients(self) -> None:
    recipe = RecipeFactory(ingredients=None)
    data = RecipeSerializer(recipe).data
    response = self.api_client.put(f'/recipes/{recipe.id}', data, format='json')
    db_recipe = Recipe.objects.get(id=recipe.id)
    db_data = RecipeSerializer(db_recipe).data
    assert_that(response.status_code).is_equal_to(status.HTTP_200_OK)
    assert_that(db_data).is_equal_to(data)
def test_should_update_recipe_without_ingredients(self) -> None:
    recipe = RecipeFactory(ingredients=None)
    data = RecipeSerializer(recipe).data
    response = self.api_client.put(f'/recipes/{recipe.id}', data, format='json')
    db_recipe = Recipe.objects.get(id=recipe.id)
    db_data = RecipeSerializer(db_recipe).data
    assert_that(response.status_code).is_equal_to(status.HTTP_200_OK)
    assert_that(db_data).is_equal_to(data)