From: Thomas Whitton Date: Thu, 20 Dec 2012 21:16:43 +0000 (+0000) Subject: suggested user tests now work with what ever user you supply, by first getting a... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1252d1d87c0138c4372aaac6ad084994e61fd0fc;p=tweepy.git suggested user tests now work with what ever user you supply, by first getting a category to search for --- diff --git a/tests.py b/tests.py index 9736340..1cf1ccf 100644 --- a/tests.py +++ b/tests.py @@ -95,14 +95,18 @@ class TweepyAPITests(unittest.TestCase): def testsearchusers(self): self.api.search_users('twitter') - def testsuggestedusers(self): - self.api.suggested_users('twitter') - def testsuggestedcategories(self): self.api.suggested_categories() - def testsuggestedhuserstweets(self): - self.api.suggested_users_tweets('twitter') + def testsuggestedusers(self): + categories = self.api.suggested_categories() + if len(categories) != 0: + self.api.suggested_users(categories[0].slug) + + def testsuggesteduserstweets(self): + categories = self.api.suggested_categories() + if len(categories) != 0: + self.api.suggested_users_tweets(categories[0].slug) def testme(self): me = self.api.me()