File tree Expand file tree Collapse file tree 2 files changed +2
-16
lines changed Expand file tree Collapse file tree 2 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -63,15 +63,6 @@ def __init__(self,
63
63
raise ValueError (
64
64
'authenticator should be of type Authenticator' )
65
65
66
- if display_name :
67
- service_name = display_name .replace (' ' , '_' ).replace ('-' , '_' ).lower ()
68
- config = read_external_sources (service_name )
69
- if config .get ('url' ):
70
- self .service_url = config .get ('url' )
71
- if config .get ('disable_ssl' ):
72
- self .disable_ssl_verification = config .get ('disable_ssl' )
73
-
74
-
75
66
def _get_system_info (self ):
76
67
return '{0} {1} {2}' .format (
77
68
platform .system (), # OS
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ def test_iam():
140
140
os .path .dirname (__file__ ), '../resources/ibm-credentials-iam.env' )
141
141
os .environ ['IBM_CREDENTIALS_FILE' ] = file_path
142
142
service = AnyServiceV1 ('2017-07-07' , authenticator = iam_authenticator )
143
- assert service .service_url == 'https://gateway-s .watsonplatform.net/watson /api'
143
+ assert service .service_url == 'https://gateway.watsonplatform.net/test /api'
144
144
del os .environ ['IBM_CREDENTIALS_FILE' ]
145
145
assert service .authenticator is not None
146
146
@@ -158,7 +158,7 @@ def test_iam():
158
158
status = 200 )
159
159
responses .add (
160
160
responses .GET ,
161
- url = 'https://gateway-s .watsonplatform.net/watson /api' ,
161
+ url = 'https://gateway.watsonplatform.net/test /api' ,
162
162
body = json .dumps ({
163
163
"foobar" : "baz"
164
164
}),
@@ -422,8 +422,3 @@ def test_service_url_not_set():
422
422
with pytest .raises (ValueError ) as err :
423
423
service .prepare_request ('POST' , url = '' )
424
424
assert str (err .value ) == 'The service_url is required'
425
-
426
- def test_multi_word_service_name ():
427
- os .environ ['personality-insights_url' ] = 'xyz'
428
- service = BaseService (service_url = '' , authenticator = NoAuthAuthenticator (), display_name = 'personality-insights' )
429
- assert service .service_url == 'xyz'
You can’t perform that action at this time.
0 commit comments