diff options
| author | Tim Graham <timograham@gmail.com> | 2015-06-08 13:27:47 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-06-10 07:41:01 -0400 |
| commit | 55b3bd84681a87266f6bef72480aaef48a7c295f (patch) | |
| tree | 4413b39f348f0a0d017db07c182ec4e0af8e6f24 /tests/auth_tests/test_forms.py | |
| parent | a0047c6242fd48068eb444e0a58f7a5d2bc1bcd3 (diff) | |
Refs #16860 -- Minor edits and fixes to password validation.
Diffstat (limited to 'tests/auth_tests/test_forms.py')
| -rw-r--r-- | tests/auth_tests/test_forms.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auth_tests/test_forms.py b/tests/auth_tests/test_forms.py index c469201408..2771c09111 100644 --- a/tests/auth_tests/test_forms.py +++ b/tests/auth_tests/test_forms.py @@ -278,8 +278,11 @@ class SetPasswordFormTest(TestDataMixin, TestCase): form = SetPasswordForm(user, data) self.assertFalse(form.is_valid()) self.assertEqual(len(form["new_password2"].errors), 2) - self.assertTrue('The password is too similar to the username.' in form["new_password2"].errors) - self.assertTrue('This password is too short. It must contain at least 12 characters.' in form["new_password2"].errors) + self.assertIn('The password is too similar to the username.', form["new_password2"].errors) + self.assertIn( + 'This password is too short. It must contain at least 12 characters.', + form["new_password2"].errors + ) @override_settings(USE_TZ=False, PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher']) |
