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

Method test_sending_headers_camel

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

Source from the content-addressed store, hash-verified

594 self.assertEqual(handler.headers_received["Range"], "bytes=20-39")
595
596 def test_sending_headers_camel(self):
597 handler = self.start_server()
598 req = urllib.request.Request("http://localhost:%s/" % handler.port,
599 headers={"X-SoMe-hEader": "foobar"})
600 with urllib.request.urlopen(req):
601 pass
602 self.assertIn("X-Some-Header", handler.headers_received.keys())
603 self.assertNotIn("X-SoMe-hEader", handler.headers_received.keys())
604
605 def test_basic(self):
606 handler = self.start_server()

Callers

nothing calls this directly

Calls 5

start_serverMethod · 0.95
assertInMethod · 0.80
assertNotInMethod · 0.80
urlopenMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected