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

Method test_http_handler_global_debuglevel

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

Source from the content-addressed store, hash-verified

1093 self.assertEqual(int(newreq.get_header('Content-length')),16)
1094
1095 def test_http_handler_global_debuglevel(self):
1096 with mock.patch.object(http.client.HTTPConnection, 'debuglevel', 6):
1097 o = OpenerDirector()
1098 h = MockHTTPHandler()
1099 o.add_handler(h)
1100 o.open("http://www.example.com")
1101 self.assertEqual(h._debuglevel, 6)
1102
1103 def test_http_handler_local_debuglevel(self):
1104 o = OpenerDirector()

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