Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Reset the meal item, this was causing test failures under some setups

Roland Geideraf02b1a81003
diff --git a/wger/nutrition/tests/nutritional_calculations.py b/wger/nutrition/tests/nutritional_calculations.py
index f67645841..33efbf14a 100644
--- a/wger/nutrition/tests/nutritional_calculations.py
+++ b/wger/nutrition/tests/nutritional_calculations.py
@@ -60,6 +60,11 @@ class NutritionalValuesCalculationsTestCase(WorkoutManagerTestCase):
self.assertEqual(result_meal, result_plan)
# One ingredient, 1 x unit 3
+ item.delete()
+ item = models.MealItem()
+ item.meal = meal
+ item.ingredient = ingredient
+ item.order = 1
item.amount = 1
item.weight_unit_id = 3
item.save()