Reload the user to get the cached profile attribute

This commit is contained in:
Calen Pennington
2015-02-26 12:23:31 -05:00
parent 81ee300132
commit 3d8e1d092c

View File

@@ -195,6 +195,9 @@ class LoginTest(TestCase):
response = client1.post(self.url, creds)
self._assert_response(response, success=True)
# Reload the user from the database
self.user = UserFactory.FACTORY_FOR.objects.get(pk=self.user.pk)
self.assertEqual(self.user.profile.get_meta()['session_id'], client1.session.session_key)
# second login should log out the first