MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_sending_headers

Method test_sending_headers

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

Source from the content-addressed store, hash-verified

597
598
599 def test_sending_headers(self):
600 handler = self.start_server()
601 req = urllib.request.Request("http://localhost:%s/" % handler.port,
602 headers={"Range": "bytes=20-39"})
603 with urllib.request.urlopen(req):
604 pass
605 self.assertEqual(handler.headers_received["Range"], "bytes=20-39")
606
607
608 def test_sending_headers_camel(self):

Callers

nothing calls this directly

Calls 3

start_serverMethod · 0.95
urlopenMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected