(self)
| 300 | self.assertStartsWith(sock.data, expected) |
| 301 | |
| 302 | def test_malformed_headers_coped_with(self): |
| 303 | # Issue 19996 |
| 304 | body = "HTTP/1.1 200 OK\r\nFirst: val\r\n: nval\r\nSecond: val\r\n\r\n" |
| 305 | sock = FakeSocket(body) |
| 306 | resp = client.HTTPResponse(sock) |
| 307 | resp.begin() |
| 308 | |
| 309 | self.assertEqual(resp.getheader('First'), 'val') |
| 310 | self.assertEqual(resp.getheader('Second'), 'val') |
| 311 | |
| 312 | def test_parse_all_octets(self): |
| 313 | # Ensure no valid header field octet breaks the parser |
nothing calls this directly
no test coverage detected