Skip to content

Commit 1277268

Browse files
committed
fixed test case
1 parent 3081cc1 commit 1277268

5 files changed

Lines changed: 6 additions & 8 deletions

File tree

‎stream/__init__.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ def connect(api_key, api_secret):
2222

2323
'''
2424
TODO:
25+
- Api & Code review Tommaso
2526
2627
- pk_gt and pk_gte seems to have the same output (pk_gt doesnt always work)
2728
- follow sometimes breaks
2829
- missing field exceptions are raised in an inconsistent way to other errors
2930
3031
- test coverage
3132
- read the docs
32-
33-
- Api & Code review Tommaso
3433
- Update getstream.io/docs page
3534
'''

‎stream/client.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class StreamClient(object):
1111
base_url = 'https://getstream.io/api/'
12-
# base_url = 'http://localhost:8000/api/'
12+
base_url = 'http://localhost:8000/api/'
1313

1414
def __init__(self, api_key, api_secret):
1515
'''

‎stream/exceptions.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ class InputException(StreamApiException):
4343
code = 4
4444

4545

46-
# TODO: this is subclassing the wrong thing it seems
4746
class CustomFieldException(StreamApiException):
4847

4948
'''

‎stream/feed.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ def get(self, **params):
7171
7272
**Example**::
7373
74-
# fast pagination using primary key filtering
75-
feed.get(limit=10, pk_lte=100292310)
74+
# fast pagination using id filtering
75+
feed.get(limit=10, id_lte=100292310)
7676
7777
# slow pagination using offset
7878
feed.get(limit=10, offset=10)

‎stream/tests.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def test_get(self):
8888
# try offset based
8989
activities = self.user1.get(limit=2, offset=1)['results']
9090
self.assertEqual(activities[0]['id'], activity_id_two)
91-
# try pk_lt based
92-
self.user1.get(limit=2, pk_lt=activity_id_two)['results']
91+
# try id_lt based
92+
activities = self.user1.get(limit=2, id_lt=activity_id_two)['results']
9393
self.assertEqual(activities[0]['id'], activity_id)
9494

9595
def test_api_key_exception(self):

0 commit comments

Comments
 (0)