Fix test_proxy_connect.py for py3.5.

This commit is contained in:
Andrey Rakhmatullin 2019-10-31 23:21:14 +05:00
parent 3ac4b430ae
commit a5eb59b92d
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ class ProxyConnectTestCase(TestCase):
with LogCapture() as l:
yield crawler.crawl(seed=request)
self._assert_got_response_code(200, l)
echo = json.loads(crawler.spider.meta['responses'][0].body)
echo = json.loads(crawler.spider.meta['responses'][0].body.decode('utf-8'))
self.assertTrue('Proxy-Authorization' not in echo['headers'])
@pytest.mark.xfail(reason='mitmproxy gives an error for noconnect requests')