import pytest
from h2.settings import SettingCodes
-from httpx import Client, Response, Timeout
+from httpx import Client, Response, TimeoutException
from .utils import MockHTTP2Backend
async with Client(backend=backend, http2=True) as client:
try:
resp = await client.get("https://nghttp2.org/httpbin/anything")
- except Timeout:
+ except TimeoutException:
pytest.xfail(reason="nghttp2.org appears to be unresponsive")
except socket.gaierror:
pytest.xfail(reason="You appear to be offline")