mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Improved test coverage for django.contrib.auth.
This commit is contained in:
committed by
Tim Graham
parent
fede65260a
commit
7588d7e439
@@ -147,6 +147,13 @@ class UserManagerTestCase(TestCase):
|
||||
password='test', is_staff=False,
|
||||
)
|
||||
|
||||
def test_make_random_password(self):
|
||||
allowed_chars = 'abcdefg'
|
||||
password = UserManager().make_random_password(5, allowed_chars)
|
||||
self.assertEqual(len(password), 5)
|
||||
for char in password:
|
||||
self.assertIn(char, allowed_chars)
|
||||
|
||||
|
||||
class AbstractBaseUserTests(TestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user