'Circular redirect chains are caught and escaped'

def test_circular_redirect(self):

    with self.assertRaises(RedirectCycleError) as context:
        self.client.get('/circular_redirect_1/', {}, follow=True)
    response = context.exception.last_response
    self.assertRedirects(response, '/circular_redirect_2/', status_code=302, target_status_code=302)
    self.assertEqual(len(response.redirect_chain), 4)
