Skip to content

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

Fix broken encoding on text for py 3

Kiran Koduru12409a0cf6c3
diff --git a/tests/test_spider.py b/tests/test_spider.py
index 6c845d826..6a52b3ea7 100644
--- a/tests/test_spider.py
+++ b/tests/test_spider.py
@@ -437,7 +437,7 @@ class NoParseMethodSpiderTest(unittest.TestCase):
def test_undefined_parse_method(self):
spider = self.spider_class('example.com')
- text = 'Random text response'
+ text = b'Random text'
resp = TextResponse(url="http://www.example.com/random_url", body=text)
exc_msg = 'Spider.parse callback is not defined'