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 13, 2024
1 parent 9dfa64b commit d525f5f
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 d525f5f

Please sign in to comment.