MCPcopy
hub / github.com/scrapy/scrapy / test_update

Method test_update

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

Source from the content-addressed store, hash-verified

99 self.assertSortedEqual(h.values(), [b"ip2", b"text/html"])
100
101 def test_update(self):
102 h = Headers()
103 h.update({"Content-Type": "text/html", "X-Forwarded-For": ["ip1", "ip2"]})
104 assert h.getlist("Content-Type") == [b"text/html"]
105 assert h.getlist("X-Forwarded-For") == [b"ip1", b"ip2"]
106
107 def test_copy(self):
108 h1 = Headers({"header1": ["value1", "value2"]})

Callers

nothing calls this directly

Calls 3

updateMethod · 0.95
getlistMethod · 0.95
HeadersClass · 0.90

Tested by

no test coverage detected