From 3e7c948267f9661e8e6ca201a0d69b0eaa66b73c Mon Sep 17 00:00:00 2001 From: Josh Roesslein Date: Wed, 12 Aug 2009 17:07:49 -0500 Subject: [PATCH] Update oauth test. --- tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests.py b/tests.py index 6335e52..052852e 100644 --- a/tests.py +++ b/tests.py @@ -105,6 +105,8 @@ class TweepyAuthTests(unittest.TestCase): def testoauth(self): auth = OAuthHandler(self.consumer_key, self.consumer_secret) + + # test getting access token auth_url = auth.get_authorization_url() self.assert_(auth_url.startswith('http://twitter.com/oauth/authorize?')) print 'Please authorize: ' + auth_url @@ -113,8 +115,9 @@ class TweepyAuthTests(unittest.TestCase): access_token = auth.get_access_token(verifier) self.assert_(access_token is not None) + # build api object test using oauth api = API(auth) - self.assertTrue(api.verify_credentials()) + api.update_status('test %i' % random.randint(0,1000)) if __name__ == '__main__': unittest.main() -- 2.25.1