Skip to content

Commit

Permalink
move model_dump out of for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
tjb1982 committed Oct 11, 2024
1 parent 93c7288 commit 860d1f0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ def test_recipe_migration(api_client: TestClient, unique_user_fn_scoped: TestUse

if mig.nutrition_entries:
assert recipe.nutrition is not None
nutrition = recipe.nutrition.model_dump(by_alias=True)

for k in mig.nutrition_entries.difference(mig.nutrition_filter):
nutrition = recipe.nutrition.model_dump(by_alias=True)
assert k in nutrition and nutrition[k] is not None

# TODO: validate other types of content
Expand Down

0 comments on commit 860d1f0

Please sign in to comment.