mirror of
https://github.com/django/django.git
synced 2025-11-23 12:26:57 +00:00
Removed a few trailing backslashes.
We have always been at war with trailing backslashes.
This commit is contained in:
parent
ee0ef1b094
commit
a5b062576b
14 changed files with 28 additions and 30 deletions
|
|
@ -167,8 +167,9 @@ def get_default_username(check_db=True):
|
|||
|
||||
default_username = get_system_username()
|
||||
try:
|
||||
default_username = unicodedata.normalize('NFKD', default_username)\
|
||||
.encode('ascii', 'ignore').decode('ascii').replace(' ', '').lower()
|
||||
default_username = (unicodedata.normalize('NFKD', default_username)
|
||||
.encode('ascii', 'ignore').decode('ascii')
|
||||
.replace(' ', '').lower())
|
||||
except UnicodeDecodeError:
|
||||
return ''
|
||||
|
||||
|
|
|
|||
|
|
@ -136,8 +136,7 @@ class RemoteUserNoCreateTest(RemoteUserTest):
|
|||
class that doesn't create unknown users.
|
||||
"""
|
||||
|
||||
backend =\
|
||||
'django.contrib.auth.tests.test_remote_user.RemoteUserNoCreateBackend'
|
||||
backend = 'django.contrib.auth.tests.test_remote_user.RemoteUserNoCreateBackend'
|
||||
|
||||
def test_unknown_user(self):
|
||||
num_users = User.objects.count()
|
||||
|
|
@ -173,8 +172,7 @@ class RemoteUserCustomTest(RemoteUserTest):
|
|||
and configure_user methods.
|
||||
"""
|
||||
|
||||
backend =\
|
||||
'django.contrib.auth.tests.test_remote_user.CustomRemoteUserBackend'
|
||||
backend = 'django.contrib.auth.tests.test_remote_user.CustomRemoteUserBackend'
|
||||
# REMOTE_USER strings with email addresses for the custom backend to
|
||||
# clean.
|
||||
known_user = 'knownuser@example.com'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue