1
0
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:
Anton Samarchyan
2017-03-01 17:29:50 -05:00
committed by Tim Graham
parent fede65260a
commit 7588d7e439
3 changed files with 54 additions and 6 deletions

View File

@@ -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):