diff --git a/common/djangoapps/student/tests/test_login.py b/common/djangoapps/student/tests/test_login.py index 1134f50b1e..e70b5ccac7 100644 --- a/common/djangoapps/student/tests/test_login.py +++ b/common/djangoapps/student/tests/test_login.py @@ -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