From: Josh Roesslein Date: Sat, 14 Nov 2009 05:14:27 +0000 (-0600) Subject: Added tests for list methods. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=28e864a235bef1651d3353ee01b51fb6ad97dfde;p=tweepy.git Added tests for list methods. --- diff --git a/CHANGELOG b/CHANGELOG index 0d7cf85..6148f6f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,7 @@ All changes made to the library that might affect applications during upgrade will be listed here. -1.2 -> 1.3 [Future] +1.2 -> 1.3 ===================== + Lists API methods added + API.verify_credentials() now returns an User object if credentials @@ -15,7 +15,7 @@ during upgrade will be listed here. + Tweepy now uses the versioned API and the new api.twitter.com subdomain + Updated retweet parsing for new payload format -1.1 -> 1.2 [Current] +1.1 -> 1.2 ===================== + API + Added automatic request re-try feature diff --git a/tests.py b/tests.py index ec5c225..c76dd64 100644 --- a/tests.py +++ b/tests.py @@ -189,6 +189,50 @@ class TweepyAPITests(unittest.TestCase): def testblocksids(self): self.api.blocks_ids() + def testcreateupdatedestroylist(self): + self.api.create_list('tweeps') + # XXX: right now twitter throws a 500 here, issue is being looked into by twitter. + #self.api.update_list('tweeps', mode='private') + self.api.destroy_list('tweeps') + + def testlists(self): + self.api.lists() + + def testlistsmemberships(self): + self.api.lists_memberships() + + def testlistssubscriptions(self): + self.api.lists_subscriptions() + + def testlisttimeline(self): + self.api.list_timeline('noradio', 'tall-people') + + def testgetlist(self): + self.api.get_list('noradio', 'tall-people') + + def testaddremovelistmember(self): + uid = self.api.get_user('twitter').id + self.api.add_list_member('test', uid) + self.api.remove_list_member('test', uid) + + def testlistmembers(self): + self.api.list_members('noradio', 'tall-people') + + def testislistmember(self): + uid = self.api.get_user('noradio').id + self.api.is_list_member('noradio', 'tall-people', uid) + + def testsubscribeunsubscribelist(self): + self.api.subscribe_list('noradio', 'tall-people') + self.api.unsubscribe_list('noradio', 'tall-people') + + def testlistsubscribers(self): + self.api.list_subscribers('noradio', 'tall-people') + + def testissubscribedlist(self): + uid = self.api.get_user('noradio').id + self.api.is_subscribed_list('noradio', 'tall-people', uid) + def testsavedsearches(self): s = self.api.create_saved_search('test') self.api.saved_searches()