diff --git a/requirements-dev.txt b/requirements-dev.txt index b2a36741..bf3063e8 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -139,7 +139,7 @@ hpack==4.0.0 ; python_full_version >= '3.6.1' httpcore==1.0.7 ; python_version >= '3.7' -httpx[http2]==0.27.2 +httpx[http2]==0.28.0 hyperframe==6.0.1 ; python_full_version >= '3.6.1' diff --git a/tests/test_graph_client_factory.py b/tests/test_graph_client_factory.py index 36138555..9055b1a1 100644 --- a/tests/test_graph_client_factory.py +++ b/tests/test_graph_client_factory.py @@ -41,11 +41,11 @@ def test_create_with_default_middleware_custom_client(): def test_create_with_default_middleware_custom_client_with_proxy(): """Test creation of GraphClient using default middleware""" proxies = { - "http://": "http://localhost:8030", - "https://": "http://localhost:8031", + "http://": httpx.HTTPTransport(proxy="http://localhost:8030"), + "https://": httpx.HTTPTransport(proxy="http://localhost:8031"), } timeout = httpx.Timeout(20, connect=10) - custom_client = httpx.AsyncClient(timeout=timeout, http2=True, proxies=proxies) + custom_client = httpx.AsyncClient(timeout=timeout, http2=True, mounts=proxies) client = GraphClientFactory.create_with_default_middleware(client=custom_client) assert isinstance(client, httpx.AsyncClient) @@ -98,11 +98,11 @@ def test_create_with_custom_middleware_custom_client(): def test_create_with_custom_middleware_custom_client_with_proxy(): """Test creation of HTTP Clients with custom middleware""" proxies = { - "http://": "http://localhost:8030", - "https://": "http://localhost:8031", + "http://": httpx.HTTPTransport(proxy="http://localhost:8030"), + "https://": httpx.HTTPTransport(proxy="http://localhost:8031"), } timeout = httpx.Timeout(20, connect=10) - custom_client = httpx.AsyncClient(timeout=timeout, http2=True, proxies=proxies) + custom_client = httpx.AsyncClient(timeout=timeout, http2=True, mounts=proxies) middleware = [ GraphTelemetryHandler(), ]