@@ -41,11 +41,11 @@ def test_create_with_default_middleware_custom_client():
41
41
def test_create_with_default_middleware_custom_client_with_proxy ():
42
42
"""Test creation of GraphClient using default middleware"""
43
43
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" ) ,
46
46
}
47
47
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 )
49
49
client = GraphClientFactory .create_with_default_middleware (client = custom_client )
50
50
51
51
assert isinstance (client , httpx .AsyncClient )
@@ -98,11 +98,11 @@ def test_create_with_custom_middleware_custom_client():
98
98
def test_create_with_custom_middleware_custom_client_with_proxy ():
99
99
"""Test creation of HTTP Clients with custom middleware"""
100
100
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" ) ,
103
103
}
104
104
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 )
106
106
middleware = [
107
107
GraphTelemetryHandler (),
108
108
]
0 commit comments