Skip to content

Commit

Permalink
print some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolay Kim committed Feb 15, 2017
1 parent 7ea1795 commit ba056e3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test_proxy_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def proxy_test_server(raw_test_server, loop, monkeypatch):

@asyncio.coroutine
def proxy_handler(request, proxy_mock):
print ('=============', proxy_mock)
proxy_mock.request = request
proxy_mock.requests_list.append(request)

Expand Down Expand Up @@ -359,8 +360,14 @@ def test_proxy_https_bad_response(proxy_test_server, get_request):
headers={'Proxy-Agent': 'TestProxy'})

with pytest.raises(aiohttp.HttpProxyError):
yield from get_request(url=url, proxy=proxy.url)

try:
yield from get_request(url=url, proxy=proxy.url)
except:
import traceback
traceback.print_exc()
raise

print('proxy is', proxy)
assert len(proxy.requests_list) == 1
assert proxy.request.method == 'CONNECT'
assert proxy.request.path == 'secure.aiohttp.io:443'
Expand Down

0 comments on commit ba056e3

Please sign in to comment.