MCPcopy
hub / github.com/urllib3/urllib3 / test_dict_conversion

Method test_dict_conversion

test/test_collections.py:401–410  ·  view source on GitHub ↗
(self, d: HTTPHeaderDict)

Source from the content-addressed store, hash-verified

399 assert "Cookie" not in items # type: ignore[comparison-overlap]
400
401 def test_dict_conversion(self, d: HTTPHeaderDict) -> None:
402 # Also tested in connectionpool, needs to preserve case
403 hdict = {
404 "Content-Length": "0",
405 "Content-type": "text/plain",
406 "Server": "Hypercorn/1.2.3",
407 }
408 h = dict(HTTPHeaderDict(hdict).items())
409 assert hdict == h
410 assert hdict == dict(HTTPHeaderDict(hdict))
411
412 def test_string_enforcement(self, d: HTTPHeaderDict) -> None:
413 # This currently throws AttributeError on key.lower(), should

Callers

nothing calls this directly

Calls 2

HTTPHeaderDictClass · 0.90
itemsMethod · 0.80

Tested by

no test coverage detected