Fix generator test, remove search_gen from coverage
This commit is contained in:
parent
5d7ebcbdfc
commit
2dc15b7030
2 changed files with 3 additions and 3 deletions
|
|
@ -65,9 +65,9 @@ class TwythonAPITestCase(unittest.TestCase):
|
||||||
self.assertRaises(TwythonError, self.api.get_lastfunction_header,
|
self.assertRaises(TwythonError, self.api.get_lastfunction_header,
|
||||||
'no-api-call-was-made')
|
'no-api-call-was-made')
|
||||||
|
|
||||||
def test_search_gen(self):
|
def test_cursor(self):
|
||||||
"""Test looping through the generator results works, at least once that is"""
|
"""Test looping through the generator results works, at least once that is"""
|
||||||
search = self.api.search_gen('twitter', count=1)
|
search = self.api.cursor(self.api.search, q='twitter', count=1)
|
||||||
counter = 0
|
counter = 0
|
||||||
while counter < 2:
|
while counter < 2:
|
||||||
counter += 1
|
counter += 1
|
||||||
|
|
|
||||||
|
|
@ -362,7 +362,7 @@ class Twython(EndpointsMixin, object):
|
||||||
)
|
)
|
||||||
return '%s?%s' % (api_url, '&'.join(querystring))
|
return '%s?%s' % (api_url, '&'.join(querystring))
|
||||||
|
|
||||||
def search_gen(self, search_query, **params):
|
def search_gen(self, search_query, **params): # pragma: no cover
|
||||||
"""Returns a generator of tweets that match a specified query.
|
"""Returns a generator of tweets that match a specified query.
|
||||||
|
|
||||||
Documentation: https://dev.twitter.com/docs/api/1.1/get/search/tweets
|
Documentation: https://dev.twitter.com/docs/api/1.1/get/search/tweets
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue