[issue23300] httplib is using a method that doesn't exist

Senthil Kumaran report at bugs.python.org
Sun Jan 25 01:43:07 CET 2015


Senthil Kumaran added the comment:

Actually, the same tests cannot be ported to 3.4 or default. httplib.HTTP class has been merged to HTTPConnection in 3.x and we don't allow a host, and port in connect().

There is good test coverage for verifying host, port in test_hort_port test in 3.x

However, I saw that TunnelTests could see some refactor and a test addition to cover the _tunnel_host, _tunnel_port attributes (which are set using _get_hostport method). 

Attaching a change to client.test_httplib which refactors TunnelTest and adds a new test called test_set_tunnel_host_port_headers. Please review if this change is Okay. I can push this in 3.4 and default branches.

Thanks!

----------
Added file: http://bugs.python.org/file37842/23300-3.3.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23300>
_______________________________________


More information about the Python-bugs-list mailing list