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
7dbb6c46
Commit
7dbb6c46
authored
Jul 05, 2012
by
Alejandro Gómez
Browse files
Explicit imports and removal of unused variables
parent
8e5adbea
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests.py
View file @
7dbb6c46
...
...
@@ -3,7 +3,8 @@ import random
from
time
import
sleep
import
os
from
tweepy
import
*
from
tweepy
import
(
API
,
BasicAuthHandler
,
OAuthHandler
,
Friendship
,
Cursor
,
MemoryCache
,
FileCache
)
"""Configurations"""
# Must supply twitter account credentials for tests
...
...
@@ -55,7 +56,7 @@ class TweepyAPITests(unittest.TestCase):
self
.
api
.
retweets
(
123
)
def
testgetstatus
(
self
):
s
=
self
.
api
.
get_status
(
id
=
123
)
self
.
api
.
get_status
(
id
=
123
)
def
testupdateanddestroystatus
(
self
):
# test update
...
...
@@ -388,4 +389,3 @@ class TweepyCacheTests(unittest.TestCase):
if
__name__
==
'__main__'
:
unittest
.
main
()
tweepy/api.py
View file @
7dbb6c46
...
...
@@ -7,7 +7,7 @@ import mimetypes
from
tweepy.binder
import
bind_api
from
tweepy.error
import
TweepError
from
tweepy.parsers
import
ModelParser
,
RawParser
from
tweepy.parsers
import
ModelParser
from
tweepy.utils
import
list_to_csv
...
...
@@ -727,7 +727,7 @@ class API(object):
try
:
if
os
.
path
.
getsize
(
filename
)
>
(
max_size
*
1024
):
raise
TweepError
(
'File is too big, must be less than 700kb.'
)
except
os
.
error
,
e
:
except
os
.
error
:
raise
TweepError
(
'Unable to access file'
)
# image must be gif, jpeg, or png
...
...
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