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

[1.2.X] Fixed #8342 -- Removed code from the admin that assumed that you can't login with an email address (nixed by r12634).

Backport from trunk (r14769).

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel
2010-12-02 01:02:11 +00:00
parent 1155b493bc
commit a607d9d345
3 changed files with 5 additions and 11 deletions

View File

@@ -453,12 +453,12 @@ class AdminViewPermissionsTest(TestCase):
self.assertContains(login, "Your e-mail address is not your username")
# only correct passwords get a username hint
login = self.client.post('/test_admin/admin/', self.super_email_bad_login)
self.assertContains(login, "Usernames cannot contain the '@' character")
self.assertContains(login, "Please enter a correct username and password")
new_user = User(username='jondoe', password='secret', email='super@example.com')
new_user.save()
# check to ensure if there are multiple e-mail addresses a user doesn't get a 500
login = self.client.post('/test_admin/admin/', self.super_email_login)
self.assertContains(login, "Usernames cannot contain the '@' character")
self.assertContains(login, "Please enter a correct username and password")
# Add User
request = self.client.get('/test_admin/admin/')
@@ -962,12 +962,12 @@ class SecureViewTest(TestCase):
self.assertContains(login, "Your e-mail address is not your username")
# only correct passwords get a username hint
login = self.client.post('/test_admin/admin/secure-view/', self.super_email_bad_login)
self.assertContains(login, "Usernames cannot contain the '@' character")
self.assertContains(login, "Please enter a correct username and password")
new_user = User(username='jondoe', password='secret', email='super@example.com')
new_user.save()
# check to ensure if there are multiple e-mail addresses a user doesn't get a 500
login = self.client.post('/test_admin/admin/secure-view/', self.super_email_login)
self.assertContains(login, "Usernames cannot contain the '@' character")
self.assertContains(login, "Please enter a correct username and password")
# Add User
request = self.client.get('/test_admin/admin/secure-view/')