diff --git a/packages/http/httpx/tests/test_kiota_client_factory.py b/packages/http/httpx/tests/test_kiota_client_factory.py index eec62d7..62273fb 100644 --- a/packages/http/httpx/tests/test_kiota_client_factory.py +++ b/packages/http/httpx/tests/test_kiota_client_factory.py @@ -34,11 +34,11 @@ def test_create_with_default_middleware_custom_client_with_proxy(): """Test creation of HTTP Client using default middleware while providing a custom client""" 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 = KiotaClientFactory.create_with_default_middleware(custom_client) assert isinstance(client, httpx.AsyncClient) @@ -96,11 +96,11 @@ def test_create_with_custom_middleware_custom_client_with_proxy(): """Test creation of HTTP Client using custom middleware while providing a custom client""" 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 = [ RetryHandler(), ]