def test_follow_redirect__badhost(self): self.assertEqual( follow_redirect('http://badhost'), [])
def test_follow_redirect__test_max_redirect(self): self.assertEqual( follow_redirect('http://www.myhost.com/loop'), [])
def test_follow_redirect__complete_relative_location(self): self.assertEqual( follow_redirect('http://www.myhost.com/noslash'), ['http://www.myhost.com/noslash', 'http://www.myhost.com/slashless'])
def test_follow_redirect__no_crash_on_missing_location(self): self.assertEqual( follow_redirect('http://www.myhost.com/nolocation'), [])
def test_follow_redirect__basic(self): self.assertEqual( follow_redirect('http://myhost.com'), ['http://myhost.com', 'http://www.myhost.com/'])