MCPcopy
hub / github.com/urllib3/urllib3 / test_items

Method test_items

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

Source from the content-addressed store, hash-verified

385 assert repr(d) == rep
386
387 def test_items(self, d: HTTPHeaderDict) -> None:
388 items = d.items()
389 assert len(items) == 2
390 assert list(items) == [
391 ("Cookie", "foo"),
392 ("Cookie", "bar"),
393 ]
394 assert ("Cookie", "foo") in items
395 assert ("Cookie", "bar") in items
396 assert ("X-Some-Header", "foo") not in items
397 assert ("Cookie", "not_present") not in items
398 assert ("Cookie", 1) not in items # type: ignore[comparison-overlap]
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

Callers

nothing calls this directly

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected