Skip to content

Commit

Permalink
Update assert for last_login
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Etienne committed Sep 18, 2014
1 parent 21f6a17 commit fd93845
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion user_management/models/tests/test_models.py
Expand Up @@ -130,8 +130,11 @@ def test_create_user_uppercase_email(self):
def test_set_last_login(self):
email = 'valid@example.com'

before = timezone.now()
user = self.manager.create_user(email)
self.assertIsNotNone(user.last_login)
after = timezone.now()

self.assertTrue(before < user.last_login < after)

def test_create_superuser(self):
email = 'valid@example.com'
Expand Down

0 comments on commit fd93845

Please sign in to comment.