def test_custom_retries(self):
RETRIES = Retry(20, backoff_factor=0.1)
options = {'path': 'test/', 'retries': RETRIES}
self.factory_custom_proxy_view(**options)
url = 'http://www.example.com/test/'
headers = {'Cookie': ''}
self.urlopen.assert_called_with('GET', url, redirect=False,
retries=RETRIES,
preload_content=False,
decode_content=False,
headers=headers, body=b'')
评论列表
文章目录