(self)
| 1209 | self.assertEqual(o.args, (req, r, 502, "Bad gateway", {})) |
| 1210 | |
| 1211 | def test_cookies(self): |
| 1212 | cj = MockCookieJar() |
| 1213 | h = urllib.request.HTTPCookieProcessor(cj) |
| 1214 | h.parent = MockOpener() |
| 1215 | |
| 1216 | req = Request("http://example.com/") |
| 1217 | r = MockResponse(200, "OK", {}, "") |
| 1218 | newreq = h.http_request(req) |
| 1219 | self.assertIs(cj.ach_req, req) |
| 1220 | self.assertIs(cj.ach_req, newreq) |
| 1221 | self.assertEqual(req.origin_req_host, "example.com") |
| 1222 | self.assertFalse(req.unverifiable) |
| 1223 | newr = h.http_response(req, r) |
| 1224 | self.assertIs(cj.ec_req, req) |
| 1225 | self.assertIs(cj.ec_r, r) |
| 1226 | self.assertIs(r, newr) |
| 1227 | |
| 1228 | def test_redirect(self): |
| 1229 | from_url = "http://example.com/a.html" |
nothing calls this directly
no test coverage detected