Skip to content

Commit

Permalink
tests/tls - httpx 0.28 deprecated "cert"
Browse files Browse the repository at this point in the history
commonism committed Jan 11, 2025

Verified

This commit was signed with the committer’s verified signature.
targos Michaël Zasso
1 parent 97cc454 commit 112722f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/tls_test.py
Original file line number Diff line number Diff line change
@@ -141,6 +141,7 @@ def self_signed(*args, **kwargs) -> httpx.AsyncClient:
ctx = ssl.create_default_context(ssl.Purpose.SERVER_AUTH, cafile=certs["org"]["issuer"])
if (cert := kwargs.get("cert", None)) is not None:
ctx.load_cert_chain(certfile=cert[0], keyfile=cert[1])
kwargs.pop("cert")
return httpx.AsyncClient(*args, verify=ctx, **kwargs)

api = await aiopenapi3.OpenAPI.load_async(
@@ -217,6 +218,7 @@ def self_signed_(*args, **kwargs) -> httpx.Client:
ctx = ssl.create_default_context(ssl.Purpose.SERVER_AUTH, cafile=certs["org"]["issuer"])
if (cert := kwargs.get("cert", None)) is not None:
ctx.load_cert_chain(certfile=cert[0], keyfile=cert[1])
kwargs.pop("cert")
return httpx.Client(*args, verify=ctx, **kwargs)

client = await asyncio.to_thread(

0 comments on commit 112722f

Please sign in to comment.