Self hosted FLOSS fitness/workout, nutrition and weight tracker
Fix some dumb errors introduced in d0f666352
Roland Geiderecc9ea1b4150
diff --git a/wger/core/tests/test_license.py b/wger/core/tests/test_license.pyindex 683a25400..f88c77f9f 100644--- a/wger/core/tests/test_license.py+++ b/wger/core/tests/test_license.py@@ -15,7 +15,6 @@from wger.core.models import Licensefrom wger.core.tests import api_base_test-from wger.exercises.models import Exercisefrom wger.manager.tests.testcase import WorkoutManagerAccessTestCase, WorkoutManagerTestCasefrom wger.manager.tests.testcase import WorkoutManagerDeleteTestCase@@ -32,7 +31,7 @@ class LicenseRepresentationTestCase(WorkoutManagerTestCase):'''Test that the representation of an object is correct'''- self.assertEqual("{0}".format(Exercise.objects.get(pk=1)),+ self.assertEqual("{0}".format(License.objects.get(pk=1)),'A cool and free license - Germany (ACAFL - DE)')diff --git a/wger/nutrition/models.py b/wger/nutrition/models.pyindex 86d2f4f96..4c39c6fa9 100644--- a/wger/nutrition/models.py+++ b/wger/nutrition/models.py@@ -95,9 +95,9 @@ class NutritionPlan(models.Model):Return a more human-readable representation'''if self.description:- return self.description+ return u"{0}".format(self.description)else:- return unicode(_("Nutrition plan"))+ return u"{0}".format(_("Nutrition plan"))def get_absolute_url(self):'''diff --git a/wger/nutrition/tests/test_plan.py b/wger/nutrition/tests/test_plan.pyindex 451d2f2be..d562d7a31 100644--- a/wger/nutrition/tests/test_plan.py+++ b/wger/nutrition/tests/test_plan.py@@ -31,7 +31,7 @@ class PlanRepresentationTestCase(WorkoutManagerTestCase):'''Test that the representation of an object is correct'''- p = NutritionPlan.objects.get(pk=1)+ p = NutritionPlan.objects.get(pk=5)self.assertEqual("{0}".format(p), 'Description 1')p.description = ''diff --git a/wger/weight/models.py b/wger/weight/models.pyindex e4481dc62..4df8b34c5 100644--- a/wger/weight/models.py+++ b/wger/weight/models.py@@ -58,7 +58,7 @@ class WeightEntry(models.Model):'''Return a more human-readable representation'''- return u"{0}: {1} kg".format(self.creation_date, self.weight)+ return u"{0}: {1:.2f} kg".format(self.creation_date, self.weight)def get_owner_object(self):'''diff --git a/wger/weight/tests/test_entry.py b/wger/weight/tests/test_entry.pyindex 1cbed55fc..265358215 100644--- a/wger/weight/tests/test_entry.py+++ b/wger/weight/tests/test_entry.py@@ -33,7 +33,7 @@ class MealRepresentationTestCase(WorkoutManagerTestCase):'''Test that the representation of an object is correct'''- self.assertEqual("{0}".format(WeightEntry.objects.get(pk=1)), '2012-10-01: 77kg')+ self.assertEqual("{0}".format(WeightEntry.objects.get(pk=1)), '2012-10-01: 77.00 kg')class AddWeightEntryTestCase(WorkoutManagerAddTestCase):