(self)
| 2267 | self.assertEqual(expected, f.read()) |
| 2268 | |
| 2269 | def test_manual_content_length(self): |
| 2270 | # Set an incorrect content-length so that we can verify that |
| 2271 | # it will not be over-ridden by the library. |
| 2272 | self.conn.request("PUT", "/url", "body", |
| 2273 | {"Content-Length": "42"}) |
| 2274 | message, f = self.get_headers_and_fp() |
| 2275 | self.assertEqual("42", message.get("content-length")) |
| 2276 | self.assertEqual(4, len(f.read())) |
| 2277 | |
| 2278 | def test_ascii_body(self): |
| 2279 | self.conn.request("PUT", "/url", "body") |
nothing calls this directly
no test coverage detected