This commit is contained in:
Tom Christie 2024-01-11 15:29:47 +00:00
parent 13483d1567
commit c9f9cb96d2
2 changed files with 4 additions and 2 deletions

View File

@ -376,6 +376,7 @@ async def test_server_extensions(server):
def test_http2_parameter_deprecated():
# The 'http1' and 'http2' flags are deprecated in favor of `version=httpx.Version(...)`.
# The 'http1' and 'http2' flags are deprecated in favor of
# `version=httpx.Version("HTTP/1.1", "HTTP/2")`.
with pytest.raises(RuntimeError):
httpx.AsyncClient(http2=True)

View File

@ -463,6 +463,7 @@ def test_client_decode_text_using_explicit_encoding():
def test_http2_parameter_deprecated():
# The 'http1' and 'http2' flags are deprecated in favor of `version=httpx.Version(...)`.
# The 'http1' and 'http2' flags are deprecated in favor of
# `version=httpx.Version("HTTP/1.1", "HTTP/2")`.
with pytest.raises(RuntimeError):
httpx.Client(http2=True)