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