Skip to content

Commit fbe03c4

Browse files
authored
Fix httpx test deprecated warning (#542)
1 parent 2e2ba3f commit fbe03c4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/test_httpx.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
TransportServerError,
1212
)
1313

14-
from .conftest import TemporaryFile, get_localhost_ssl_context, strip_braces_spaces
14+
from .conftest import (
15+
TemporaryFile,
16+
get_localhost_ssl_context_client,
17+
strip_braces_spaces,
18+
)
1519

1620
# Marking all tests in this file with the httpx marker
1721
pytestmark = pytest.mark.httpx
@@ -105,9 +109,9 @@ def test_code():
105109
extra_args = {}
106110

107111
if verify_https == "cert_provided":
108-
cert, _ = get_localhost_ssl_context()
112+
_, ssl_context = get_localhost_ssl_context_client()
109113

110-
extra_args["verify"] = cert.decode()
114+
extra_args["verify"] = ssl_context
111115
elif verify_https == "disabled":
112116
extra_args["verify"] = False
113117

0 commit comments

Comments
 (0)