(self)
| 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"]}) |