1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #21379 -- Created auth-specific username validators

Thanks Tim Graham for the review.
This commit is contained in:
Claude Paroz
2016-04-22 19:39:13 +02:00
parent 2265ff3710
commit 526575c641
11 changed files with 168 additions and 33 deletions

View File

@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import warnings
@@ -56,6 +57,10 @@ class BasicTestCase(TestCase):
u2 = User.objects.create_user('testuser2', 'test2@example.com')
self.assertFalse(u2.has_usable_password())
def test_unicode_username(self):
User.objects.create_user('jörg')
User.objects.create_user('Григорий')
def test_is_anonymous_authenticated_method_deprecation(self):
deprecation_message = (
'Using user.is_authenticated() and user.is_anonymous() as a '