From ec8afbc060fdd4b5159470c3964f4482ccf4dbe3 Mon Sep 17 00:00:00 2001 From: nyov Date: Sat, 25 Jul 2015 17:56:46 +0000 Subject: [PATCH] PY3 fix test pipeline media --- tests/py3-ignores.txt | 1 - tests/test_pipeline_files.py | 2 +- tests/test_pipeline_media.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/py3-ignores.txt b/tests/py3-ignores.txt index a6c92d508..96b07ae28 100644 --- a/tests/py3-ignores.txt +++ b/tests/py3-ignores.txt @@ -30,7 +30,6 @@ tests/test_logformatter.py tests/test_mail.py tests/test_pipeline_files.py tests/test_pipeline_images.py -tests/test_pipeline_media.py tests/test_proxy_connect.py tests/test_responsetypes.py tests/test_selector_csstranslator.py diff --git a/tests/test_pipeline_files.py b/tests/test_pipeline_files.py index b12f41174..ac0438eba 100644 --- a/tests/test_pipeline_files.py +++ b/tests/test_pipeline_files.py @@ -192,7 +192,7 @@ def _create_item_with_files(*files): def _prepare_request_object(item_url): return Request( item_url, - meta={'response': Response(item_url, status=200, body='data')}) + meta={'response': Response(item_url, status=200, body=b'data')}) if __name__ == "__main__": diff --git a/tests/test_pipeline_media.py b/tests/test_pipeline_media.py index fd8b28ce1..f30b4fea3 100644 --- a/tests/test_pipeline_media.py +++ b/tests/test_pipeline_media.py @@ -44,7 +44,7 @@ class BaseMediaPipelineTestCase(unittest.TestCase): def test_default_media_downloaded(self): request = Request('http://url') - response = Response('http://url', body='') + response = Response('http://url', body=b'') assert self.pipe.media_downloaded(response, request, self.info) is response def test_default_media_failed(self):