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

Method test_http_handler_local_debuglevel

Lib/test/test_urllib2.py:1103–1108  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1101 self.assertEqual(h._debuglevel, 6)
1102
1103 def test_http_handler_local_debuglevel(self):
1104 o = OpenerDirector()
1105 h = MockHTTPHandler(debuglevel=5)
1106 o.add_handler(h)
1107 o.open("http://www.example.com")
1108 self.assertEqual(h._debuglevel, 5)
1109
1110 @unittest.skipUnless(hasattr(http.client, 'HTTPSConnection'), 'HTTPSConnection required for HTTPS tests.')
1111 def test_https_handler_global_debuglevel(self):

Callers

nothing calls this directly

Calls 5

add_handlerMethod · 0.95
openMethod · 0.95
OpenerDirectorClass · 0.90
MockHTTPHandlerClass · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected