'An assertion is raised if the response redirect target cannot be retrieved as expected'

def test_target_page(self):

    response = self.client.get('/test_client/double_redirect_view/')
    try:
        self.assertRedirects(response, 'http://testserver/test_client/permanent_redirect_view/')
    except AssertionError as e:
        self.assertIn("Couldn't    retrieve    redirection    page    '/test_client/permanent_redirect_view/':    response    code    was    301    (expected    200)", str(e))
    try:
        self.assertRedirects(response, 'http://testserver/test_client/permanent_redirect_view/', msg_prefix='abc')
    except AssertionError as e:
        self.assertIn("abc:    Couldn't    retrieve    redirection    page    '/test_client/permanent_redirect_view/':    response    code    was    301    (expected    200)", str(e))
