mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-04 21:15:22 +02:00
feat: Add Households to Mealie (#3970)
This commit is contained in:
parent
0c29cef17d
commit
eb170cc7e5
315 changed files with 6975 additions and 3577 deletions
|
@ -15,7 +15,7 @@ def test_associate_ingredient_with_step(api_client: TestClient, unique_user: Tes
|
|||
# Associate an ingredient with a step
|
||||
steps = {} # key=step_id, value=ingredient_id
|
||||
|
||||
for idx, step in enumerate(recipe.recipe_instructions):
|
||||
for idx, step in enumerate(recipe.recipe_instructions or []):
|
||||
ingredients = random.choices(recipe.recipe_ingredient, k=2)
|
||||
|
||||
step.ingredient_references = [
|
||||
|
@ -39,7 +39,7 @@ def test_associate_ingredient_with_step(api_client: TestClient, unique_user: Tes
|
|||
|
||||
data: dict = json.loads(response.text)
|
||||
|
||||
for idx, stp in enumerate(data.get("recipeInstructions")):
|
||||
for idx, stp in enumerate(data.get("recipeInstructions") or []):
|
||||
all_refs = [ref["referenceId"] for ref in stp.get("ingredientReferences")]
|
||||
|
||||
assert len(all_refs) == 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue