Commit 9f244c04 authored by Joshua Roesslein's avatar Joshua Roesslein
Browse files

Add failing test for TweepError pickle bug.

A test for the fail case in issue #193.

[ci skip]
parent b852f8e3
......@@ -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):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment