MCPcopy Index your code
hub / github.com/python/cpython / test_proxy_cgi_ignore

Method test_proxy_cgi_ignore

Lib/test/test_urllib.py:217–227  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

215 self.assertTrue(urllib.request.proxy_bypass_environment('newdomain.com:1234'))
216
217 def test_proxy_cgi_ignore(self):
218 try:
219 self.env.set('HTTP_PROXY', 'http://somewhere:3128')
220 proxies = urllib.request.getproxies_environment()
221 self.assertEqual('http://somewhere:3128', proxies['http'])
222 self.env.set('REQUEST_METHOD', 'GET')
223 proxies = urllib.request.getproxies_environment()
224 self.assertNotIn('http', proxies)
225 finally:
226 self.env.unset('REQUEST_METHOD')
227 self.env.unset('HTTP_PROXY')
228
229 def test_proxy_bypass_environment_host_match(self):
230 bypass = urllib.request.proxy_bypass_environment

Callers

nothing calls this directly

Calls 4

assertNotInMethod · 0.80
unsetMethod · 0.80
setMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected