diff --git a/scrapy/tests/test_downloadermiddleware.py b/scrapy/tests/test_downloadermiddleware.py index cbe3c378d..b7d3594cd 100644 --- a/scrapy/tests/test_downloadermiddleware.py +++ b/scrapy/tests/test_downloadermiddleware.py @@ -70,7 +70,7 @@ class DefaultsTest(ManagerTestCase): req = Request('http://example.com') body = '

You are being redirected

' resp = Response(req.url, status=302, body=body, headers={ - 'Content-Length': len(body), + 'Content-Length': str(len(body)), 'Content-Type': 'text/html', 'Content-Encoding': 'gzip', 'Location': 'http://example.com/login', @@ -85,7 +85,7 @@ class DefaultsTest(ManagerTestCase): req = Request('http://example.com') body = '

You are being redirected

' resp = Response(req.url, status=200, body=body, headers={ - 'Content-Length': len(body), + 'Content-Length': str(len(body)), 'Content-Type': 'text/html', 'Content-Encoding': 'gzip', 'Location': 'http://example.com/login',