Added tests for list methods.
authorJosh Roesslein <jroesslein@gmail.com>
Sat, 14 Nov 2009 05:14:27 +0000 (23:14 -0600)
committerJosh Roesslein <jroesslein@gmail.com>
Sat, 14 Nov 2009 05:49:46 +0000 (23:49 -0600)
CHANGELOG
tests.py

index 0d7cf85617e80487dd5d0e4d000dcd5ef5260889..6148f6fc845a34add9d5292fb5a3e1ba2a369dd0 100644 (file)
--- 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
index ec5c22554e1e46e5063d7a63bbb2c6090fadf9e5..c76dd64c5e454197cb71a51c5dc307ca6af8240f 100644 (file)
--- 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()