(self)
| 72 | assert "Content-Type" not in h |
| 73 | |
| 74 | def test_setdefault(self): |
| 75 | h = Headers() |
| 76 | hlist = ["ip1", "ip2"] |
| 77 | olist = h.setdefault("X-Forwarded-For", hlist) |
| 78 | assert h.getlist("X-Forwarded-For") is not hlist |
| 79 | assert h.getlist("X-Forwarded-For") is olist |
| 80 | |
| 81 | h = Headers() |
| 82 | olist = h.setdefault("X-Forwarded-For", "ip1") |
| 83 | assert h.getlist("X-Forwarded-For") == [b"ip1"] |
| 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"]} |
nothing calls this directly
no test coverage detected