(self)
| 1063 | self.assertFalse(req.has_header("Content-length")) |
| 1064 | |
| 1065 | def test_http_body_array(self): |
| 1066 | # array.array Iterable - Content Length is calculated |
| 1067 | |
| 1068 | h = urllib.request.AbstractHTTPHandler() |
| 1069 | o = h.parent = MockOpener() |
| 1070 | |
| 1071 | iterable_array = array.array("I",[1,2,3,4]) |
| 1072 | |
| 1073 | for headers in {}, {"Content-Length": 16}: |
| 1074 | req = Request("http://example.com/", iterable_array, headers) |
| 1075 | newreq = h.do_request_(req) |
| 1076 | self.assertEqual(int(newreq.get_header('Content-length')),16) |
| 1077 | |
| 1078 | def test_http_handler_global_debuglevel(self): |
| 1079 | with mock.patch.object(http.client.HTTPConnection, 'debuglevel', 6): |
nothing calls this directly
no test coverage detected