Scrapy, a fast high-level web crawling & scraping framework for Python.
py3 test fix: putChild expects bytes as path
Konstantin Lopuhinae4aa2c3b24a
diff --git a/tests/test_webclient.py b/tests/test_webclient.pyindex 84b1011b8..02e24de05 100644--- a/tests/test_webclient.py+++ b/tests/test_webclient.py@@ -220,13 +220,13 @@ class WebClientTestCase(unittest.TestCase):os.mkdir(name)FilePath(name).child("file").setContent(b"0123456789")r = static.File(name)- r.putChild("redirect", util.Redirect("/file"))- r.putChild("wait", ForeverTakingResource())- r.putChild("error", ErrorResource())- r.putChild("nolength", NoLengthResource())- r.putChild("host", HostHeaderResource())- r.putChild("payload", PayloadResource())- r.putChild("broken", BrokenDownloadResource())+ r.putChild(b"redirect", util.Redirect("/file"))+ r.putChild(b"wait", ForeverTakingResource())+ r.putChild(b"error", ErrorResource())+ r.putChild(b"nolength", NoLengthResource())+ r.putChild(b"host", HostHeaderResource())+ r.putChild(b"payload", PayloadResource())+ r.putChild(b"broken", BrokenDownloadResource())self.site = server.Site(r, timeout=None)self.wrapper = WrappingFactory(self.site)self.port = self._listen(self.wrapper)