(proxy_test_server, get_request)
| 577 | |
| 578 | |
| 579 | async def test_proxy_https_bad_response(proxy_test_server, get_request) -> None: |
| 580 | url = "https://secure.aiohttp.io/path" |
| 581 | proxy = await proxy_test_server() |
| 582 | proxy.return_value = dict(status=502, headers={"Proxy-Agent": "TestProxy"}) |
| 583 | |
| 584 | with pytest.raises(aiohttp.ClientHttpProxyError): |
| 585 | await get_request(url=url, proxy=proxy.url) |
| 586 | |
| 587 | assert len(proxy.requests_list) == 1 |
| 588 | assert proxy.request.method == "CONNECT" |
| 589 | # The following check fails on MacOS |
| 590 | # assert proxy.request.path == 'secure.aiohttp.io:443' |
| 591 | |
| 592 | |
| 593 | @pytest.mark.xfail |
nothing calls this directly
no test coverage detected