Improve the test_https_tunnel_without_leak_proxy_authorization_header change.

This commit is contained in:
Andrey Rakhmatullin 2019-11-01 19:46:19 +05:00
parent 5eb01b617d
commit e0c5c72496
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.decode('utf-8'))
echo = json.loads(crawler.spider.meta['responses'][0].text)
self.assertTrue('Proxy-Authorization' not in echo['headers'])
@pytest.mark.xfail(reason='mitmproxy gives an error for noconnect requests')