Skip to content

Commit 9855e76

Browse files
committed
get rid of base url
1 parent 8b9ad3b commit 9855e76

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

stream/client.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222

2323
class StreamClient(object):
24-
base_url = 'https://api.stream-io-api.com/api/'
2524

2625
def __init__(self, api_key, api_secret, app_id, version='v1.0', timeout=6.0, base_url=None, location=None):
2726
'''
@@ -77,8 +76,6 @@ def __init__(self, api_key, api_secret, app_id, version='v1.0', timeout=6.0, bas
7776
self.base_analytics_url = 'https://analytics.stream-io-api.com/analytics/'
7877

7978
self.session = requests.Session()
80-
# TODO: turn this back on after we verify it doesnt retry on slower requests
81-
self.session.mount(self.base_url, HTTPAdapter(max_retries=0))
8279
self.auth = HTTPSignatureAuth(api_key, secret=api_secret)
8380

8481
# setup personalization

stream/tests.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,14 @@ def test_heroku_location_compat(self):
195195
self.assertEqual(
196196
client.api_secret, 'gthc2t9gh7pzq52f6cky8w4r4up9dr6rju9w3fjgmkv6cdvvav2ufe5fv7e2r9qy')
197197

198+
feed_url = client.get_full_url('api', 'feed/')
198199
if self.local_tests:
199200
self.assertEqual(
200-
client.base_url, 'http://localhost:8000/api/')
201+
feed_url, 'http://localhost:8000/api/v1.0/feed/')
201202
else:
202203
self.assertEqual(
203-
client.base_url, 'https://us-east-api.stream-io-api.com/api/')
204+
feed_url, 'https://us-east-api.stream-io-api.com/api/v1.0/feed/')
205+
204206
self.assertEqual(client.app_id, '1')
205207

206208
def test_heroku_location(self):
@@ -211,12 +213,13 @@ def test_heroku_location(self):
211213
self.assertEqual(
212214
client.api_secret, 'gthc2t9gh7pzq52f6cky8w4r4up9dr6rju9w3fjgmkv6cdvvav2ufe5fv7e2r9qy')
213215

216+
feed_url = client.get_full_url('api', 'feed/')
214217
if self.local_tests:
215218
self.assertEqual(
216-
client.base_url, 'http://localhost:8000/api/')
219+
feed_url, 'http://localhost:8000/api/v1.0/feed/')
217220
else:
218221
self.assertEqual(
219-
client.base_url, 'https://us-east-api.stream-io-api.com/api/')
222+
feed_url, 'https://us-east-api.stream-io-api.com/api/v1.0/feed/')
220223
self.assertEqual(client.app_id, '1')
221224

222225
def test_heroku_overwrite(self):

0 commit comments

Comments
 (0)