oops, forgot the logged in test

This commit is contained in:
Evert Prants 2017-12-11 15:39:01 +02:00
parent 35cb450f1f
commit 08ffa3fc50
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -40,6 +40,9 @@ class TestLogin(TestCase):
self.assertEqual(user.email,'johnsmith@gmail.com') self.assertEqual(user.email,'johnsmith@gmail.com')
self.assertEqual(user.display_name, 'Mr. Smith') self.assertEqual(user.display_name, 'Mr. Smith')
# Check that the user has been logged in
self.assertEqual(client.get('/').context['user'], user)
def test_reject_bad_state(self): def test_reject_bad_state(self):
with responses.RequestsMock() as rm: with responses.RequestsMock() as rm:
client = Client() client = Client()
@ -73,6 +76,9 @@ class TestLogin(TestCase):
self.assertEqual(user.email,'johnsmith@gmail.com') self.assertEqual(user.email,'johnsmith@gmail.com')
self.assertEqual(user.display_name, 'Mr. Smith') self.assertEqual(user.display_name, 'Mr. Smith')
# Check that the user has been logged in
self.assertEqual(client.get('/').context['user'], user)
def test_states_unique(self): def test_states_unique(self):
with responses.RequestsMock() as rm: with responses.RequestsMock() as rm:
client1 = Client() client1 = Client()