(self)
| 1182 | self.assertEqual(r.selector, '') |
| 1183 | |
| 1184 | def test_fixpath_in_weirdurls(self): |
| 1185 | # Issue4493: urllib2 to supply '/' when to urls where path does not |
| 1186 | # start with'/' |
| 1187 | |
| 1188 | h = urllib.request.AbstractHTTPHandler() |
| 1189 | h.parent = MockOpener() |
| 1190 | |
| 1191 | weird_url = 'http://www.python.org?getspam' |
| 1192 | req = Request(weird_url) |
| 1193 | newreq = h.do_request_(req) |
| 1194 | self.assertEqual(newreq.host, 'www.python.org') |
| 1195 | self.assertEqual(newreq.selector, '/?getspam') |
| 1196 | |
| 1197 | url_without_path = 'http://www.python.org' |
| 1198 | req = Request(url_without_path) |
| 1199 | newreq = h.do_request_(req) |
| 1200 | self.assertEqual(newreq.host, 'www.python.org') |
| 1201 | self.assertEqual(newreq.selector, '') |
| 1202 | |
| 1203 | def test_errors(self): |
| 1204 | h = urllib.request.HTTPErrorProcessor() |
nothing calls this directly
no test coverage detected