Skip to content

Commit 2dc15b7

Browse files
Fix generator test, remove search_gen from coverage
1 parent 5d7ebcb commit 2dc15b7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/test_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ def test_get_lastfunction_header_no_last_api_call(self):
6565
self.assertRaises(TwythonError, self.api.get_lastfunction_header,
6666
'no-api-call-was-made')
6767

68-
def test_search_gen(self):
68+
def test_cursor(self):
6969
"""Test looping through the generator results works, at least once that is"""
70-
search = self.api.search_gen('twitter', count=1)
70+
search = self.api.cursor(self.api.search, q='twitter', count=1)
7171
counter = 0
7272
while counter < 2:
7373
counter += 1

twython/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def construct_api_url(http://github.com/api_url,%20**params):
362362
)
363363
return '%s?%s' % (api_url, '&'.join(querystring))
364364

365-
def search_gen(self, search_query, **params):
365+
def search_gen(self, search_query, **params): # pragma: no cover
366366
"""Returns a generator of tweets that match a specified query.
367367
368368
Documentation: https://dev.twitter.com/docs/api/1.1/get/search/tweets

0 commit comments

Comments
 (0)