]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Fix Timeout -> TimeoutException in test case (#598)
authorTom Christie <tom@tomchristie.com>
Thu, 5 Dec 2019 11:03:27 +0000 (11:03 +0000)
committerGitHub <noreply@github.com>
Thu, 5 Dec 2019 11:03:27 +0000 (11:03 +0000)
tests/dispatch/test_http2.py

index 2fb6701a16467f44d123ef34c93499e75ef2f713..375b805394cf5cac487a273c88a95434b9b904eb 100644 (file)
@@ -6,7 +6,7 @@ import h2.events
 import pytest
 from h2.settings import SettingCodes
 
-from httpx import Client, Response, Timeout
+from httpx import Client, Response, TimeoutException
 
 from .utils import MockHTTP2Backend
 
@@ -142,7 +142,7 @@ async def test_http2_live_request(backend):
     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")