(self)
| 1478 | self.assertEqual(req.host, "www.python.org") |
| 1479 | |
| 1480 | def test_proxy_no_proxy_all(self): |
| 1481 | env = self.enterContext(os_helper.EnvironmentVarGuard()) |
| 1482 | env['no_proxy'] = '*' |
| 1483 | o = OpenerDirector() |
| 1484 | ph = urllib.request.ProxyHandler(dict(http="proxy.example.com")) |
| 1485 | o.add_handler(ph) |
| 1486 | req = Request("http://www.python.org") |
| 1487 | self.assertEqual(req.host, "www.python.org") |
| 1488 | o.open(req) |
| 1489 | self.assertEqual(req.host, "www.python.org") |
| 1490 | |
| 1491 | def test_proxy_https(self): |
| 1492 | o = OpenerDirector() |
nothing calls this directly
no test coverage detected