'As above, but same user logging in after a password change.'

def test_session_key_flushed_on_login_after_password_change(self):

    self.login()
    original_session_key = self.client.session.session_key
    self.login()
    self.assertEqual(original_session_key, self.client.session.session_key)
    user = User.objects.get(username='testclient')
    user.set_password('foobar')
    user.save()
    self.login(password='foobar')
    self.assertNotEqual(original_session_key, self.client.session.session_key)
