

def test_redirect(self):
    response = self.client.get(self.link.get_absolute_url())
    self.assertTrue(response)
    self.assertEqual(response.status_code, 302)
    try:
        self.assertEqual(response.items()[2][1], 'http://www.oppsproject.org/')
    except:
        self.assertEqual(response.items()[3][1], 'http://www.oppsproject.org/')

dataset/ETHPy150Open opps/opps/tests/views/test_generic_detail.py LinkResponseToRedirecTest.test_redirect/original