@@ -41,11 +41,11 @@ def test_create_with_default_middleware_custom_client():
4141def test_create_with_default_middleware_custom_client_with_proxy ():
4242 """Test creation of GraphClient using default middleware"""
4343 proxies = {
44- "http://" : "http://localhost:8030" ,
45- "https://" : "http://localhost:8031" ,
44+ "http://" : httpx . HTTPTransport ( proxy = "http://localhost:8030" ) ,
45+ "https://" : httpx . HTTPTransport ( proxy = "http://localhost:8031" ) ,
4646 }
4747 timeout = httpx .Timeout (20 , connect = 10 )
48- custom_client = httpx .AsyncClient (timeout = timeout , http2 = True , proxies = proxies )
48+ custom_client = httpx .AsyncClient (timeout = timeout , http2 = True , mounts = proxies )
4949 client = GraphClientFactory .create_with_default_middleware (client = custom_client )
5050
5151 assert isinstance (client , httpx .AsyncClient )
@@ -98,11 +98,11 @@ def test_create_with_custom_middleware_custom_client():
9898def test_create_with_custom_middleware_custom_client_with_proxy ():
9999 """Test creation of HTTP Clients with custom middleware"""
100100 proxies = {
101- "http://" : "http://localhost:8030" ,
102- "https://" : "http://localhost:8031" ,
101+ "http://" : httpx . HTTPTransport ( proxy = "http://localhost:8030" ) ,
102+ "https://" : httpx . HTTPTransport ( proxy = "http://localhost:8031" ) ,
103103 }
104104 timeout = httpx .Timeout (20 , connect = 10 )
105- custom_client = httpx .AsyncClient (timeout = timeout , http2 = True , proxies = proxies )
105+ custom_client = httpx .AsyncClient (timeout = timeout , http2 = True , mounts = proxies )
106106 middleware = [
107107 GraphTelemetryHandler (),
108108 ]
0 commit comments