suggested user tests now work with what ever user you supply, by first getting a...
authorThomas Whitton <mail@thomaswhitton.com>
Thu, 20 Dec 2012 21:16:43 +0000 (21:16 +0000)
committerThomas Whitton <mail@thomaswhitton.com>
Thu, 20 Dec 2012 21:16:43 +0000 (21:16 +0000)
tests.py

index 97363405cd317a0b6d48f8f5bd846694202651a9..1cf1ccf77125c2b80be24b4b33d1f216f5e64b15 100644 (file)
--- 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()