Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

fix tests to account for https://github.com/scrapy/w3lib/pull/23

Mikhail Korobovaf0635e2295b
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 = '<p>You are being redirected</p>'
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 = '<p>You are being redirected</p>'
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',