mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Refs #16860 -- Fixed a resource and deprecation warning in password validation.
This commit is contained in:
parent
e6dd7f995a
commit
09f2cdbe1a
2 changed files with 4 additions and 2 deletions
|
@ -41,7 +41,7 @@ class PasswordValidationTest(TestCase):
|
|||
self.assertIsNone(validate_password('sufficiently-long'))
|
||||
msg_too_short = 'This password is too short. It must contain at least 12 characters.'
|
||||
|
||||
with self.assertRaises(ValidationError, args=['This password is too short.']) as cm:
|
||||
with self.assertRaises(ValidationError) as cm:
|
||||
validate_password('django4242')
|
||||
self.assertEqual(cm.exception.messages, [msg_too_short])
|
||||
self.assertEqual(cm.exception.error_list[0].code, 'password_too_short')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue