]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Ignore http_proxy while connecting to test WSGI server
authorAngus Lees <gus@inodes.org>
Thu, 31 Jul 2014 05:27:18 +0000 (15:27 +1000)
committerAngus Lees <gus@inodes.org>
Thu, 14 Aug 2014 01:39:24 +0000 (11:39 +1000)
commit6d7b2e007cf477a7f212312bad4ce0cbe8032d1a
treed0ec83b93f6388b89ee2889a546ecc31faf81e34
parentf32c0ebe68f0ad27ac7a9717ef3f6e3406f953a1
Ignore http_proxy while connecting to test WSGI server

urllib2.urlopen uses $http_proxy/$HTTP_PROXY environment variables by
default.  If set (and pointing to a remote host), then the WSGI tests
that spin up a local server and connect to it using
http://127.0.0.1:$port/ instead connect to $port *on the proxy*,
and (hopefully) fail.

This change uses urllib2 in a way that ignores proxy settings.

Change-Id: I4d94fcc06925d0c947345a07ae20352e1898e46d
Closes-Bug: #1356665
neutron/tests/unit/test_wsgi.py