MCPcopy
hub / github.com/scrapy/scrapy / test_multivalue_for_one_header

Method test_multivalue_for_one_header

tests/test_http_headers.py:44–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

42 assert h.getlist("X-Forwarded-For") is not hlist
43
44 def test_multivalue_for_one_header(self):
45 h = Headers((("a", "b"), ("a", "c")))
46 assert h["a"] == b"c"
47 assert h.get("a") == b"c"
48 assert h.getlist("a") == [b"b", b"c"]
49
50 def test_encode_utf8(self):
51 h = Headers({"key": "\xa3"}, encoding="utf-8")

Callers

nothing calls this directly

Calls 3

getMethod · 0.95
getlistMethod · 0.95
HeadersClass · 0.90

Tested by

no test coverage detected