(self)
| 1080 | self.assertFalse(req.has_header("Content-length")) |
| 1081 | |
| 1082 | def test_http_body_array(self): |
| 1083 | # array.array Iterable - Content Length is calculated |
| 1084 | |
| 1085 | h = urllib.request.AbstractHTTPHandler() |
| 1086 | o = h.parent = MockOpener() |
| 1087 | |
| 1088 | iterable_array = array.array("I",[1,2,3,4]) |
| 1089 | |
| 1090 | for headers in {}, {"Content-Length": 16}: |
| 1091 | req = Request("http://example.com/", iterable_array, headers) |
| 1092 | newreq = h.do_request_(req) |
| 1093 | self.assertEqual(int(newreq.get_header('Content-length')),16) |
| 1094 | |
| 1095 | def test_http_handler_global_debuglevel(self): |
| 1096 | with mock.patch.object(http.client.HTTPConnection, 'debuglevel', 6): |
nothing calls this directly
no test coverage detected