1
0
mirror of https://github.com/django/django.git synced 2025-10-26 23:26:08 +00:00

Fixed #7220 -- Allowed AbstractBaseUser.last_login to be null.

Thanks veena for the suggestion and Simon Charette and Kévin Etienne for reviews.
This commit is contained in:
Tim Graham
2014-07-29 08:56:00 -04:00
parent 1a31d9ef91
commit a2479f46f3
6 changed files with 55 additions and 5 deletions

View File

@@ -156,6 +156,13 @@ class AbstractUserTestCase(TestCase):
self.assertEqual(message.from_email, "from@domain.com")
self.assertEqual(message.to, [abstract_user.email])
def test_last_login_default(self):
user1 = User.objects.create(username='user1')
self.assertIsNone(user1.last_login)
user2 = User.objects.create_user(username='user2')
self.assertIsNone(user2.last_login)
class IsActiveTestCase(TestCase):
"""