summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_views.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-04-07 22:04:45 -0400
committerTim Graham <timograham@gmail.com>2016-04-08 10:12:33 -0400
commit92053acbb9160862c3e743a99ed8ccff8d4f8fd6 (patch)
tree50e7fd28a650f0e2352cf94f92e5a66d28a81988 /tests/auth_tests/test_views.py
parentdf8d8d4292684d6ffa7474f1e201aed486f02b53 (diff)
Fixed E128 flake8 warnings in tests/.
Diffstat (limited to 'tests/auth_tests/test_views.py')
-rw-r--r--tests/auth_tests/test_views.py24
1 files changed, 8 insertions, 16 deletions
diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py
index 2df2c75122..5b4b877c47 100644
--- a/tests/auth_tests/test_views.py
+++ b/tests/auth_tests/test_views.py
@@ -255,8 +255,7 @@ class PasswordResetTest(AuthViewsTestCase):
def test_confirm_complete(self):
url, path = self._test_confirm_start()
- response = self.client.post(path, {'new_password1': 'anewpassword',
- 'new_password2': 'anewpassword'})
+ response = self.client.post(path, {'new_password1': 'anewpassword', 'new_password2': 'anewpassword'})
# Check the password has been changed
u = User.objects.get(email='staffmember@example.com')
self.assertTrue(u.check_password("anewpassword"))
@@ -267,48 +266,41 @@ class PasswordResetTest(AuthViewsTestCase):
def test_confirm_different_passwords(self):
url, path = self._test_confirm_start()
- response = self.client.post(path, {'new_password1': 'anewpassword',
- 'new_password2': 'x'})
+ response = self.client.post(path, {'new_password1': 'anewpassword', 'new_password2': 'x'})
self.assertFormError(response, SetPasswordForm.error_messages['password_mismatch'])
def test_reset_redirect_default(self):
- response = self.client.post('/password_reset/',
- {'email': 'staffmember@example.com'})
+ response = self.client.post('/password_reset/', {'email': 'staffmember@example.com'})
self.assertEqual(response.status_code, 302)
self.assertURLEqual(response.url, '/password_reset/done/')
def test_reset_custom_redirect(self):
- response = self.client.post('/password_reset/custom_redirect/',
- {'email': 'staffmember@example.com'})
+ response = self.client.post('/password_reset/custom_redirect/', {'email': 'staffmember@example.com'})
self.assertEqual(response.status_code, 302)
self.assertURLEqual(response.url, '/custom/')
def test_reset_custom_redirect_named(self):
- response = self.client.post('/password_reset/custom_redirect/named/',
- {'email': 'staffmember@example.com'})
+ response = self.client.post('/password_reset/custom_redirect/named/', {'email': 'staffmember@example.com'})
self.assertEqual(response.status_code, 302)
self.assertURLEqual(response.url, '/password_reset/')
def test_confirm_redirect_default(self):
url, path = self._test_confirm_start()
- response = self.client.post(path, {'new_password1': 'anewpassword',
- 'new_password2': 'anewpassword'})
+ response = self.client.post(path, {'new_password1': 'anewpassword', 'new_password2': 'anewpassword'})
self.assertEqual(response.status_code, 302)
self.assertURLEqual(response.url, '/reset/done/')
def test_confirm_redirect_custom(self):
url, path = self._test_confirm_start()
path = path.replace('/reset/', '/reset/custom/')
- response = self.client.post(path, {'new_password1': 'anewpassword',
- 'new_password2': 'anewpassword'})
+ response = self.client.post(path, {'new_password1': 'anewpassword', 'new_password2': 'anewpassword'})
self.assertEqual(response.status_code, 302)
self.assertURLEqual(response.url, '/custom/')
def test_confirm_redirect_custom_named(self):
url, path = self._test_confirm_start()
path = path.replace('/reset/', '/reset/custom/named/')
- response = self.client.post(path, {'new_password1': 'anewpassword',
- 'new_password2': 'anewpassword'})
+ response = self.client.post(path, {'new_password1': 'anewpassword', 'new_password2': 'anewpassword'})
self.assertEqual(response.status_code, 302)
self.assertURLEqual(response.url, '/password_reset/')