app/recipe/tests/test_recipe_api.py
def sample_recipe(user, **params):
    """Create a return a sample recipe"""
    default = {"title": "Sample recipe", "time_minutes": 10, "price": 5.0}

    default.update(params)

    return Recipe.objects.create(user=user, **default)
Create a return a sample recipe
Create a return a sample recipe
Create a return a sample recipe
def sample_recipe(user, **params):
    default = {"title": "Sample recipe", "time_minutes": 10, "price": 5.0}
    default.update(params)
    return Recipe.objects.create(user=user, **default)
def sample_recipe ( user , ** params ) : default = { "title" : "Sample recipe" , "time_minutes" : 10 , "price" : 5.0 } default . update ( params ) return Recipe . objects . create ( user = user , ** default )
Create a return a sample recipe
Create a return a sample recipe
"""Create a return a sample recipe"""
user