Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Small changes to fix tests on python3

Roland Geidera241c2eb9315
diff --git a/wger/nutrition/models.py b/wger/nutrition/models.py
index 597e47298..7cb1feb60 100644
--- a/wger/nutrition/models.py
+++ b/wger/nutrition/models.py
@@ -437,6 +437,9 @@ class WeightUnit(models.Model):
class Meta:
ordering = ["name", ]
+ def __str__(self):
+ return self.__unicode__()
+
def __unicode__(self):
'''
Return a more human-readable representation
diff --git a/wger/nutrition/tests/test_weight_unit_ingredient.py b/wger/nutrition/tests/test_weight_unit_ingredient.py
index 25c4aeea3..0ed5568fc 100644
--- a/wger/nutrition/tests/test_weight_unit_ingredient.py
+++ b/wger/nutrition/tests/test_weight_unit_ingredient.py
@@ -84,7 +84,7 @@ class WeightUnitFormTestCase(WorkoutManagerTestCase):
def test_edit_weight_unit(self):
'''
- Tests that the form in the edit view only shows weigh units in the user's language
+ Tests that the form in the edit view only shows weight units in the user's language
'''
self.user_login('admin')
response = self.client.get(reverse('nutrition:unit_ingredient:edit',
diff --git a/wger/weight/tests/test_overview.py b/wger/weight/tests/test_overview.py
index e86041392..94f42944e 100644
--- a/wger/weight/tests/test_overview.py
+++ b/wger/weight/tests/test_overview.py
@@ -55,7 +55,7 @@ class WeightExportCsvTestCase(WorkoutManagerTestCase):
self.assertEqual(response.status_code, 200)
self.assertEqual(response['Content-Type'], 'text/csv')
self.assertGreaterEqual(len(response.content), 120)
- self.assertLessEqual(len(response.content), 140)
+ self.assertLessEqual(len(response.content), 150)
def test_csv_export_loged_in(self):
'''