Esempio n. 1
0
 def test_follow_redirect__badhost(self):
     self.assertEqual(
             follow_redirect('http://badhost'),
             [])
Esempio n. 2
0
 def test_follow_redirect__test_max_redirect(self):
     self.assertEqual(
             follow_redirect('http://www.myhost.com/loop'),
             [])
Esempio n. 3
0
 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'])
Esempio n. 4
0
 def test_follow_redirect__no_crash_on_missing_location(self):
     self.assertEqual(
             follow_redirect('http://www.myhost.com/nolocation'),
             [])
Esempio n. 5
0
 def test_follow_redirect__basic(self):
     self.assertEqual(
             follow_redirect('http://myhost.com'),
             ['http://myhost.com', 'http://www.myhost.com/'])