summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_models.py
diff options
context:
space:
mode:
authorAnton Samarchyan <desecho@gmail.com>2017-03-01 17:29:50 -0500
committerTim Graham <timograham@gmail.com>2017-03-01 17:29:50 -0500
commit7588d7e439a5deb7f534bdeb2abe407b937e3c1a (patch)
tree898a1fd05c11036d2519f379ea5656e6086e7b2b /tests/auth_tests/test_models.py
parentfede65260aaf3a5100d1c07de771707dd50b1f35 (diff)
Improved test coverage for django.contrib.auth.
Diffstat (limited to 'tests/auth_tests/test_models.py')
-rw-r--r--tests/auth_tests/test_models.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auth_tests/test_models.py b/tests/auth_tests/test_models.py
index f688c5ae74..142fbcc39c 100644
--- a/tests/auth_tests/test_models.py
+++ b/tests/auth_tests/test_models.py
@@ -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):