mirror of https://github.com/scrapy/scrapy.git
PY3 fix test pipeline media
This commit is contained in:
parent
8ab1648a36
commit
ec8afbc060
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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__":
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue