def test_all_redirections_preloaded(self):
self.reqs['responses']['http'].url = 'https://www.pokeinthe.io/foo/bar'
for url in ('http://pokeinthe.io/',
'https://pokeinthe.io/',
'https://www.pokeinthe.io/',
'https://baz.pokeinthe.io/foo'):
history = UserDict()
history.request = UserDict()
history.request.url = url
self.reqs['responses']['http'].history.append(history)
result = redirection(self.reqs)
self.assertEquals('redirection-all-redirects-preloaded', result['result'])
self.assertTrue(result['pass'])
评论列表
文章目录