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
9f244c04
Commit
9f244c04
authored
Nov 08, 2012
by
Joshua Roesslein
Browse files
Add failing test for TweepError pickle bug.
A test for the fail case in issue #193. [ci skip]
parent
b852f8e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests.py
View file @
9f244c04
...
...
@@ -18,6 +18,18 @@ test_tweet_id = '266367358078169089'
"""Unit tests"""
class
TweepyErrorTests
(
unittest
.
TestCase
):
def
testpickle
(
self
):
"""Verify exceptions can be pickled and unpickled."""
import
pickle
from
tweepy.error
import
TweepError
e
=
TweepError
(
'no reason'
,
{
'status'
:
200
})
e2
=
pickle
.
loads
(
pickle
.
dumps
(
e
))
self
.
assertEqual
(
e
.
reason
,
e2
.
reason
)
self
.
assertEqual
(
e
.
response
,
e2
.
response
)
class
TweepyAPITests
(
unittest
.
TestCase
):
...
...
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