@@ -87,7 +87,7 @@ def test_get_remote_connection_headers_adds_keep_alive_if_requested():
87
87
def test_get_proxy_url_http (mock_proxy_settings ):
88
88
proxy = "http://http_proxy.com:8080"
89
89
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 ()
91
91
assert proxy_url == proxy
92
92
93
93
@@ -96,7 +96,7 @@ def test_get_auth_header_if_client_config_pass_basic_auth():
96
96
remote_server_addr = "http://remote" , keep_alive = True , username = "user" , password = "pass" , auth_type = AuthType .BASIC
97
97
)
98
98
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 ()
100
100
assert headers .get ("Authorization" ) == "Basic dXNlcjpwYXNz"
101
101
102
102
@@ -105,7 +105,7 @@ def test_get_auth_header_if_client_config_pass_bearer_token():
105
105
remote_server_addr = "http://remote" , keep_alive = True , auth_type = AuthType .BEARER , token = "dXNlcjpwYXNz"
106
106
)
107
107
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 ()
109
109
assert headers .get ("Authorization" ) == "Bearer dXNlcjpwYXNz"
110
110
111
111
@@ -114,14 +114,14 @@ def test_get_auth_header_if_client_config_pass_x_api_key():
114
114
remote_server_addr = "http://remote" , keep_alive = True , auth_type = AuthType .X_API_KEY , token = "abcdefgh123456789"
115
115
)
116
116
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 ()
118
118
assert headers .get ("X-API-Key" ) == "abcdefgh123456789"
119
119
120
120
121
121
def test_get_proxy_url_https (mock_proxy_settings ):
122
122
proxy = "http://https_proxy.com:8080"
123
123
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 ()
125
125
assert proxy_url == proxy
126
126
127
127
@@ -162,7 +162,7 @@ def test_get_proxy_direct_via_client_config():
162
162
remote_connection = RemoteConnection (client_config = client_config )
163
163
conn = remote_connection ._get_connection_manager ()
164
164
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 ()
166
166
assert proxy_url is None
167
167
168
168
@@ -176,19 +176,19 @@ def test_get_proxy_system_matches_no_proxy_via_client_config():
176
176
remote_connection = RemoteConnection (client_config = client_config )
177
177
conn = remote_connection ._get_connection_manager ()
178
178
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 ()
180
180
assert proxy_url is None
181
181
182
182
183
183
def test_get_proxy_url_none (mock_proxy_settings_missing ):
184
184
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 ()
186
186
assert proxy_url is None
187
187
188
188
189
189
def test_get_proxy_url_http_auth (mock_proxy_auth_settings ):
190
190
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 ()
192
192
raw_proxy_url , basic_auth_string = remote_connection ._separate_http_proxy_auth ()
193
193
assert proxy_url == "http://user:password@http_proxy.com:8080"
194
194
assert raw_proxy_url == "http://http_proxy.com:8080"
@@ -197,7 +197,7 @@ def test_get_proxy_url_http_auth(mock_proxy_auth_settings):
197
197
198
198
def test_get_proxy_url_https_auth (mock_proxy_auth_settings ):
199
199
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 ()
201
201
raw_proxy_url , basic_auth_string = remote_connection ._separate_http_proxy_auth ()
202
202
assert proxy_url == "https://user:password@https_proxy.com:8080"
203
203
assert raw_proxy_url == "https://https_proxy.com:8080"
@@ -489,7 +489,6 @@ def test_get_connection_manager_ignores_certificates():
489
489
assert conn .connection_pool_kw ["timeout" ] == 10
490
490
assert conn .connection_pool_kw ["cert_reqs" ] == "CERT_NONE"
491
491
assert isinstance (conn , urllib3 .PoolManager )
492
-
493
492
remote_connection .reset_timeout ()
494
493
assert remote_connection .get_timeout () is None
495
494
0 commit comments