@@ -87,7 +87,7 @@ def test_get_remote_connection_headers_adds_keep_alive_if_requested():
8787def test_get_proxy_url_http (mock_proxy_settings ):
8888 proxy = "http://http_proxy.com:8080"
8989 remote_connection = RemoteConnection ("http://remote" , keep_alive = False )
90- proxy_url = remote_connection ._client_config .get_proxy_url ()
90+ proxy_url = remote_connection .client_config .get_proxy_url ()
9191 assert proxy_url == proxy
9292
9393
@@ -96,7 +96,7 @@ def test_get_auth_header_if_client_config_pass_basic_auth():
9696 remote_server_addr = "http://remote" , keep_alive = True , username = "user" , password = "pass" , auth_type = AuthType .BASIC
9797 )
9898 remote_connection = RemoteConnection (custom_config .remote_server_addr , client_config = custom_config )
99- headers = remote_connection ._client_config .get_auth_header ()
99+ headers = remote_connection .client_config .get_auth_header ()
100100 assert headers .get ("Authorization" ) == "Basic dXNlcjpwYXNz"
101101
102102
@@ -105,7 +105,7 @@ def test_get_auth_header_if_client_config_pass_bearer_token():
105105 remote_server_addr = "http://remote" , keep_alive = True , auth_type = AuthType .BEARER , token = "dXNlcjpwYXNz"
106106 )
107107 remote_connection = RemoteConnection (custom_config .remote_server_addr , client_config = custom_config )
108- headers = remote_connection ._client_config .get_auth_header ()
108+ headers = remote_connection .client_config .get_auth_header ()
109109 assert headers .get ("Authorization" ) == "Bearer dXNlcjpwYXNz"
110110
111111
@@ -114,14 +114,14 @@ def test_get_auth_header_if_client_config_pass_x_api_key():
114114 remote_server_addr = "http://remote" , keep_alive = True , auth_type = AuthType .X_API_KEY , token = "abcdefgh123456789"
115115 )
116116 remote_connection = RemoteConnection (custom_config .remote_server_addr , client_config = custom_config )
117- headers = remote_connection ._client_config .get_auth_header ()
117+ headers = remote_connection .client_config .get_auth_header ()
118118 assert headers .get ("X-API-Key" ) == "abcdefgh123456789"
119119
120120
121121def test_get_proxy_url_https (mock_proxy_settings ):
122122 proxy = "http://https_proxy.com:8080"
123123 remote_connection = RemoteConnection ("https://remote" , keep_alive = False )
124- proxy_url = remote_connection ._client_config .get_proxy_url ()
124+ proxy_url = remote_connection .client_config .get_proxy_url ()
125125 assert proxy_url == proxy
126126
127127
@@ -162,7 +162,7 @@ def test_get_proxy_direct_via_client_config():
162162 remote_connection = RemoteConnection (client_config = client_config )
163163 conn = remote_connection ._get_connection_manager ()
164164 assert isinstance (conn , urllib3 .PoolManager )
165- proxy_url = remote_connection ._client_config .get_proxy_url ()
165+ proxy_url = remote_connection .client_config .get_proxy_url ()
166166 assert proxy_url is None
167167
168168
@@ -176,19 +176,19 @@ def test_get_proxy_system_matches_no_proxy_via_client_config():
176176 remote_connection = RemoteConnection (client_config = client_config )
177177 conn = remote_connection ._get_connection_manager ()
178178 assert isinstance (conn , urllib3 .PoolManager )
179- proxy_url = remote_connection ._client_config .get_proxy_url ()
179+ proxy_url = remote_connection .client_config .get_proxy_url ()
180180 assert proxy_url is None
181181
182182
183183def test_get_proxy_url_none (mock_proxy_settings_missing ):
184184 remote_connection = RemoteConnection ("https://remote" , keep_alive = False )
185- proxy_url = remote_connection ._client_config .get_proxy_url ()
185+ proxy_url = remote_connection .client_config .get_proxy_url ()
186186 assert proxy_url is None
187187
188188
189189def test_get_proxy_url_http_auth (mock_proxy_auth_settings ):
190190 remote_connection = RemoteConnection ("http://remote" , keep_alive = False )
191- proxy_url = remote_connection ._client_config .get_proxy_url ()
191+ proxy_url = remote_connection .client_config .get_proxy_url ()
192192 raw_proxy_url , basic_auth_string = remote_connection ._separate_http_proxy_auth ()
193193 assert proxy_url == "http://user:password@http_proxy.com:8080"
194194 assert raw_proxy_url == "http://http_proxy.com:8080"
@@ -197,7 +197,7 @@ def test_get_proxy_url_http_auth(mock_proxy_auth_settings):
197197
198198def test_get_proxy_url_https_auth (mock_proxy_auth_settings ):
199199 remote_connection = RemoteConnection ("https://remote" , keep_alive = False )
200- proxy_url = remote_connection ._client_config .get_proxy_url ()
200+ proxy_url = remote_connection .client_config .get_proxy_url ()
201201 raw_proxy_url , basic_auth_string = remote_connection ._separate_http_proxy_auth ()
202202 assert proxy_url == "https://user:password@https_proxy.com:8080"
203203 assert raw_proxy_url == "https://https_proxy.com:8080"
@@ -489,7 +489,6 @@ def test_get_connection_manager_ignores_certificates():
489489 assert conn .connection_pool_kw ["timeout" ] == 10
490490 assert conn .connection_pool_kw ["cert_reqs" ] == "CERT_NONE"
491491 assert isinstance (conn , urllib3 .PoolManager )
492-
493492 remote_connection .reset_timeout ()
494493 assert remote_connection .get_timeout () is None
495494
0 commit comments