changed tests to support removed step type
This commit is contained in:
parent
42aaed011c
commit
9e9a61e94e
@ -200,7 +200,7 @@ def test_shopping_recipe_userpreference(recipe, sle_count, use_mealplan, user2):
|
||||
food = Food.objects.get(id=ingredients[2].food.id)
|
||||
food.onhand_users.add(user)
|
||||
food.save()
|
||||
food = recipe.steps.filter(type=Step.RECIPE).first().step_recipe.steps.first().ingredients.first().food
|
||||
food = recipe.steps.exclude(step_recipe=None).first().step_recipe.steps.first().ingredients.first().food
|
||||
food = Food.objects.get(id=food.id)
|
||||
food.onhand_users.add(user)
|
||||
food.save()
|
||||
|
@ -269,10 +269,8 @@ class StepFactory(factory.django.DjangoModelFactory):
|
||||
return
|
||||
if kwargs.get('has_recipe', False):
|
||||
self.step_recipe = RecipeFactory(space=self.space)
|
||||
self.type = Step.RECIPE
|
||||
elif extracted:
|
||||
self.step_recipe = extracted
|
||||
self.type = Step.RECIPE
|
||||
|
||||
@factory.post_generation
|
||||
def ingredients(self, create, extracted, **kwargs):
|
||||
|
Loading…
Reference in New Issue
Block a user