From 18bd82ba55e6e6f2270d4c26fe6cf828ee767cce Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 30 May 2016 19:23:27 -0400 Subject: [PATCH] Fix authentication app view tests. --- mayan/apps/authentication/tests/test_views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mayan/apps/authentication/tests/test_views.py b/mayan/apps/authentication/tests/test_views.py index 314e5ba43a..e7243e297d 100644 --- a/mayan/apps/authentication/tests/test_views.py +++ b/mayan/apps/authentication/tests/test_views.py @@ -6,6 +6,7 @@ from django.core.urlresolvers import reverse from django.test import TestCase, override_settings from django.test.client import Client +from organizations.tests.base import OrganizationTestCase from user_management.tests.literals import ( TEST_ADMIN_EMAIL, TEST_ADMIN_PASSWORD, TEST_ADMIN_USERNAME ) @@ -13,18 +14,22 @@ from user_management.tests.literals import ( from .literals import TEST_EMAIL_AUTHENTICATION_BACKEND -class UserLoginTestCase(TestCase): +class UserLoginTestCase(OrganizationTestCase): """ Test that users can login via the supported authentication methods """ def setUp(self): + super(UserLoginTestCase, self).setUp() self.admin_user = get_user_model().objects.create_superuser( username=TEST_ADMIN_USERNAME, email=TEST_ADMIN_EMAIL, password=TEST_ADMIN_PASSWORD ) self.client = Client() + def tearDown(self): + super(UserLoginTestCase, self).tearDown() + @override_settings(AUTHENTICATION_LOGIN_METHOD='username') def test_normal_behaviour(self): response = self.client.get(reverse('documents:document_list'))