'The session isn\'t lost if a user logs in'

def test_session(self):

    response = self.client.get('/test_client_regress/check_session/')
    self.assertEqual(response.status_code, 200)
    self.assertEqual(response.content, 'NO')
    response = self.client.get('/test_client_regress/set_session/')
    self.assertEqual(response.status_code, 200)
    self.assertEqual(response.content, 'set_session')
    response = self.client.get('/test_client_regress/check_session/')
    self.assertEqual(response.status_code, 200)
    self.assertEqual(response.content, 'YES')
    login = self.client.login(username='testclient', password='password')
    self.assertTrue(login, 'Could    not    log    in')
    response = self.client.get('/test_client_regress/check_session/')
    self.assertEqual(response.status_code, 200)
    self.assertEqual(response.content, 'YES')
