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

Method test_sending_headers

Lib/test/test_urllib2_localnet.py:588–594  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

586 self.assertEqual(sni_name, "localhost")
587
588 def test_sending_headers(self):
589 handler = self.start_server()
590 req = urllib.request.Request("http://localhost:%s/" % handler.port,
591 headers={"Range": "bytes=20-39"})
592 with urllib.request.urlopen(req):
593 pass
594 self.assertEqual(handler.headers_received["Range"], "bytes=20-39")
595
596 def test_sending_headers_camel(self):
597 handler = self.start_server()

Callers

nothing calls this directly

Calls 3

start_serverMethod · 0.95
urlopenMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected