(self)
| 1165 | self.assertEqual(r.selector, '') |
| 1166 | |
| 1167 | def test_fixpath_in_weirdurls(self): |
| 1168 | # Issue4493: urllib2 to supply '/' when to urls where path does not |
| 1169 | # start with'/' |
| 1170 | |
| 1171 | h = urllib.request.AbstractHTTPHandler() |
| 1172 | h.parent = MockOpener() |
| 1173 | |
| 1174 | weird_url = 'http://www.python.org?getspam' |
| 1175 | req = Request(weird_url) |
| 1176 | newreq = h.do_request_(req) |
| 1177 | self.assertEqual(newreq.host, 'www.python.org') |
| 1178 | self.assertEqual(newreq.selector, '/?getspam') |
| 1179 | |
| 1180 | url_without_path = 'http://www.python.org' |
| 1181 | req = Request(url_without_path) |
| 1182 | newreq = h.do_request_(req) |
| 1183 | self.assertEqual(newreq.host, 'www.python.org') |
| 1184 | self.assertEqual(newreq.selector, '') |
| 1185 | |
| 1186 | def test_errors(self): |
| 1187 | h = urllib.request.HTTPErrorProcessor() |
nothing calls this directly
no test coverage detected