From eb0cea62d68d886b20b630f2160a94c78a05427f Mon Sep 17 00:00:00 2001 From: Joshua Roesslein Date: Tue, 20 Aug 2013 23:20:45 -0700 Subject: [PATCH] Filter out the request body in replay recordings. - Prevents encoding errors when uploading binary data. --- tests/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: -- 2.25.1