From: Joshua Roesslein Date: Wed, 21 Aug 2013 06:20:45 +0000 (-0700) Subject: Filter out the request body in replay recordings. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=eb0cea62d68d886b20b630f2160a94c78a05427f;p=tweepy.git Filter out the request body in replay recordings. - Prevents encoding errors when uploading binary data. --- diff --git a/tests/config.py b/tests/config.py index ac9f2ec..ad152aa 100644 --- a/tests/config.py +++ b/tests/config.py @@ -23,8 +23,10 @@ class TweepyTestCase(TestCase): self.api.retry_delay = 5 if use_replay: + def filter_body(data): return '' start_replay('tests/record.json', - headers_key=filter_headers_key(['Authorization'])) + headers_key=filter_headers_key(['Authorization']), + body_key=filter_body) def tearDown(self): if use_replay: