(self)
| 34 | assert h.getlist("Content-Type") == [b"text/html"] |
| 35 | |
| 36 | def test_multivalue(self): |
| 37 | h = Headers() |
| 38 | h["X-Forwarded-For"] = hlist = ["ip1", "ip2"] |
| 39 | assert h["X-Forwarded-For"] == b"ip2" |
| 40 | assert h.get("X-Forwarded-For") == b"ip2" |
| 41 | assert h.getlist("X-Forwarded-For") == [b"ip1", b"ip2"] |
| 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"))) |