Skip to content

Instantly share code, notes, and snippets.

@klement97
Created January 4, 2021 21:10
Show Gist options
  • Save klement97/246435419864d1038eabb06b50268f1e to your computer and use it in GitHub Desktop.
Save klement97/246435419864d1038eabb06b50268f1e to your computer and use it in GitHub Desktop.
def create_pizza(number_of_toppings: int, **kwargs) -> Pizza:
pizza = baker.make('order.Pizza', **kwargs)
for _ in range(number_of_toppings):
pizza.toppings.add(baker.make('order.Topping'))
return pizza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment