MCPcopy
hub / github.com/scrapy/scrapy / test_appendlist

Method test_appendlist

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

Source from the content-addressed store, hash-verified

113 assert isinstance(h2, Headers)
114
115 def test_appendlist(self):
116 h1 = Headers({"header1": "value1"})
117 h1.appendlist("header1", "value3")
118 assert h1.getlist("header1") == [b"value1", b"value3"]
119
120 h1 = Headers()
121 h1.appendlist("header1", "value1")
122 h1.appendlist("header1", "value3")
123 assert h1.getlist("header1") == [b"value1", b"value3"]
124
125 def test_setlist(self):
126 h1 = Headers({"header1": "value1"})

Callers

nothing calls this directly

Calls 3

appendlistMethod · 0.95
getlistMethod · 0.95
HeadersClass · 0.90

Tested by

no test coverage detected