Self hosted FLOSS fitness/workout, nutrition and weight tracker
Login and logout using django's test client functions, not our views
Roland Geider2912b4ad7d7c
diff --git a/exercises/tests.py b/exercises/tests.pyindex 33a3e638a..99fce8255 100644--- a/exercises/tests.py+++ b/exercises/tests.py@@ -32,13 +32,12 @@ class WorkoutManagerTestCase(TestCase):def user_login(self, user='admin'):"""Login the user, by default as 'admin'"""- response = self.client.post(reverse('manager.views.login'),- {'username': '%s' % user,- 'password': '%(user)s%(user)s' % {'user': user}})+ self.client.login(username=user, password='%(user)s%(user)s' % {'user': user})+def user_logout(self):"""Visit the logout page"""- response = self.client.get(reverse('manager.views.logout'))+ self.client.logout()class ExerciseIndexTestCase(WorkoutManagerTestCase):