(self)
| 84 | assert h.getlist("X-Forwarded-For") is olist |
| 85 | |
| 86 | def test_iterables(self): |
| 87 | idict = {"Content-Type": "text/html", "X-Forwarded-For": ["ip1", "ip2"]} |
| 88 | |
| 89 | h = Headers(idict) |
| 90 | assert dict(h) == { |
| 91 | b"Content-Type": [b"text/html"], |
| 92 | b"X-Forwarded-For": [b"ip1", b"ip2"], |
| 93 | } |
| 94 | self.assertSortedEqual(h.keys(), [b"X-Forwarded-For", b"Content-Type"]) |
| 95 | self.assertSortedEqual( |
| 96 | h.items(), |
| 97 | [(b"X-Forwarded-For", [b"ip1", b"ip2"]), (b"Content-Type", [b"text/html"])], |
| 98 | ) |
| 99 | self.assertSortedEqual(h.values(), [b"ip2", b"text/html"]) |
| 100 | |
| 101 | def test_update(self): |
| 102 | h = Headers() |
nothing calls this directly
no test coverage detected