Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fix pep8 errors in schedule test

Roland Geider94be6c1040a5
diff --git a/wger/manager/migrations/0003_auto_20150518_1534.py b/wger/manager/migrations/0003_auto_20150518_1534.py
new file mode 100644
index 000000000..6d18036be
--- /dev/null
+++ b/wger/manager/migrations/0003_auto_20150518_1534.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+import django.core.validators
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('manager', '0002_auto_20150202_2040'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='setting',
+ name='weight',
+ field=models.IntegerField(blank=True, null=True, verbose_name='Weight', validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)]),
+ preserve_default=True,
+ ),
+ ]
diff --git a/wger/manager/tests/test_schedule.py b/wger/manager/tests/test_schedule.py
index 18b844f39..b638d2314 100644
--- a/wger/manager/tests/test_schedule.py
+++ b/wger/manager/tests/test_schedule.py
@@ -33,6 +33,7 @@ from wger.utils.helpers import make_token
logger = logging.getLogger(__name__)
+
class ScheduleShareButtonTestCase(WorkoutManagerTestCase):
'''
Test that the share button is correctly displayed and hidden
@@ -52,6 +53,7 @@ class ScheduleShareButtonTestCase(WorkoutManagerTestCase):
response = self.client.get(workout.get_absolute_url())
self.assertFalse(response.context['show_shariff'])
+
class ScheduleAccessTestCase(WorkoutManagerTestCase):
'''
Test accessing the workout page
@@ -93,6 +95,7 @@ class ScheduleAccessTestCase(WorkoutManagerTestCase):
response = self.client.get(workout.get_absolute_url())
self.assertEqual(response.status_code, 403)
+
class ScheduleRepresentationTestCase(WorkoutManagerTestCase):
'''
Test the representation of a model