(self)
| 267 | self.serviceNetworkSettings["password"] = password |
| 268 | |
| 269 | def getProxySettingsInRequestsFormat(self) -> dict: |
| 270 | proxies = {} |
| 271 | proxy_settings = self.getProxySettings() |
| 272 | if proxy_settings is not None: |
| 273 | # form proxy address in format "http://host:port |
| 274 | proxy_host_port = '{}:{}'.format(proxy_settings[0], proxy_settings[1]) |
| 275 | proxy_auth_details = self.getProxyAuthDetails() |
| 276 | user_pass = '' |
| 277 | if proxy_auth_details is not None: |
| 278 | # construct prefix in form "user:password@" |
| 279 | user_pass = '{}:{}@'.format(proxy_auth_details[0], proxy_auth_details[1]) |
| 280 | proxies = { |
| 281 | 'http': 'http://' + user_pass + proxy_host_port, |
| 282 | 'https': 'http://' + user_pass + proxy_host_port |
| 283 | } |
| 284 | return proxies |
| 285 | |
| 286 | |
| 287 | class HTMLExportSettings: |
no test coverage detected