Skip to content

Commit 0e2c540

Browse files
committed
fix more heroku tests
1 parent 9855e76 commit 0e2c540

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

stream/tests.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,14 @@ def test_heroku_no_location(self):
179179
self.assertEqual(
180180
client.api_secret, 'twc5ywfste5bm2ngqkzs7ukxk3pn96yweghjrxcmcrarnt3j4dqj3tucbhym5wfd')
181181
self.assertEqual(client.app_id, '669')
182+
feed_url = client.get_full_url('api', 'feed/')
182183

183184
if self.local_tests:
184185
self.assertEqual(
185-
client.base_url, 'http://localhost:8000/api/')
186+
feed_url, 'http://localhost:8000/api/v1.0/feed/')
186187
else:
187188
self.assertEqual(
188-
client.base_url, 'https://api.stream-io-api.com/api/')
189+
feed_url, 'https://api.stream-io-api.com/api/v1.0/feed/')
189190

190191
def test_heroku_location_compat(self):
191192
url = 'https://ahj2ndz7gsan:gthc2t9gh7pzq52f6cky8w4r4up9dr6rju9w3fjgmkv6cdvvav2ufe5fv7e2r9qy@us-east.getstream.io/?app_id=1'
@@ -233,12 +234,13 @@ def test_heroku_overwrite(self):
233234
def test_location_support(self):
234235
client = stream.connect('a', 'b', 'c', location='us-east')
235236

236-
full_location = 'https://us-east-api.stream-io-api.com/api/'
237+
full_location = 'https://us-east-api.stream-io-api.com/api/v1.0/feed/'
237238
if self.local_tests:
238-
full_location = 'http://localhost:8000/api/'
239+
full_location = 'http://localhost:8000/api/v1.0/feed/'
239240

240241
self.assertEqual(client.location, 'us-east')
241-
self.assertEqual(client.base_url, full_location)
242+
feed_url = client.get_full_url('api', 'feed/')
243+
self.assertEqual(feed_url, full_location)
242244

243245
# test a wrong location, can only work on non-local test running
244246
if not self.local_tests:

0 commit comments

Comments
 (0)