(
selenium_coverage: typing.Any, testserver_http: PyodideServerInfo
)
| 135 | |
| 136 | # wrong protocol / protocol error etc. should raise an exception of http.client.HTTPException |
| 137 | def test_wrong_protocol( |
| 138 | selenium_coverage: typing.Any, testserver_http: PyodideServerInfo |
| 139 | ) -> None: |
| 140 | @run_in_pyodide # type: ignore[untyped-decorator] |
| 141 | def pyodide_test(selenium_coverage, host: str, port: int) -> None: # type: ignore[no-untyped-def] |
| 142 | import http.client |
| 143 | |
| 144 | import pytest |
| 145 | |
| 146 | from urllib3.connection import HTTPConnection |
| 147 | |
| 148 | conn = HTTPConnection(host, port) |
| 149 | with pytest.raises(http.client.HTTPException): |
| 150 | conn.request("GET", f"http://{host}:{port}/") |
| 151 | |
| 152 | pyodide_test( |
| 153 | selenium_coverage, testserver_http.http_host, testserver_http.https_port |
| 154 | ) |
| 155 | |
| 156 | |
| 157 | # wrong protocol / protocol error etc. should raise an exception of http.client.HTTPException |
nothing calls this directly
no test coverage detected