Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
3e7c9482
Commit
3e7c9482
authored
Aug 12, 2009
by
Josh Roesslein
Browse files
Update oauth test.
parent
d4f52770
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests.py
View file @
3e7c9482
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment