From 1252d1d87c0138c4372aaac6ad084994e61fd0fc Mon Sep 17 00:00:00 2001 From: Thomas Whitton Date: Thu, 20 Dec 2012 21:16:43 +0000 Subject: [PATCH] suggested user tests now work with what ever user you supply, by first getting a category to search for --- tests.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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() -- 2.25.1