def test_user_switch_forces_new_login(self):
    '\n        Tests that if the username in the header changes between requests\n        that the original user is logged out\n        '
    User.objects.create(username='knownuser')
    response = self.client.get('/remote_user/', **{self.header: self.known_user})
    self.assertEqual(response.context['user'].username, 'knownuser')
    response = self.client.get('/remote_user/', **{self.header: 'newnewuser'})
    self.assertNotEqual(response.context['user'].username, 'knownuser')
Tests that if the username in the header changes between requests
that the original user is logged out
def test_user_switch_forces_new_login(self):
    '\n        Tests that if the username in the header changes between requests\n        that the original user is logged out\n        '
    User.objects.create(username='knownuser')
    response = self.client.get('/remote_user/', **{self.header: self.known_user})
    self.assertEqual(response.context['user'].username, 'knownuser')
    response = self.client.get('/remote_user/', **{self.header: 'newnewuser'})
    self.assertNotEqual(response.context['user'].username, 'knownuser')