[PKG-Openstack-devel] Bug#758020: tests try to connect to the network during the tests
Matthias Klose
doko at ubuntu.com
Wed Aug 13 12:04:06 UTC 2014
Package: python-wsgi-intercept
Version: 0.8.1-1
Severity: serious
Tags: sid jessie
=================================== FAILURES ===================================
__________________________ test_http_not_intercepted ___________________________
def test_http_not_intercepted():
with InstalledApp(wsgi_app.raises_app, host=HOST, port=80) as app:
http_client = http_lib.HTTPConnection('google.com')
> http_client.request('GET', '/')
test/test_http_client.py:57:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python2.7/httplib.py:995: in request
self._send_request(method, url, body, headers)
/usr/lib/python2.7/httplib.py:1029: in _send_request
self.endheaders(body)
/usr/lib/python2.7/httplib.py:991: in endheaders
self._send_output(message_body)
/usr/lib/python2.7/httplib.py:844: in _send_output
self.send(msg)
/usr/lib/python2.7/httplib.py:806: in send
self.connect()
wsgi_intercept/__init__.py:492: in connect
HTTPConnection.connect(self)
/usr/lib/python2.7/httplib.py:787: in connect
self.timeout, self.source_address)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
address = ('google.com', 80), timeout = <object object at 0xf755c558>
source_address = None
def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
source_address=None):
"""Connect to *address* and return the socket object.
Convenience function. Connect to *address* (a 2-tuple ``(host,
port)``) and return the socket object. Passing the optional
*timeout* parameter will set the timeout on the socket instance
before attempting to connect. If no *timeout* is supplied, the
global default timeout setting returned by :func:`getdefaulttimeout`
is used. If *source_address* is set it must be a tuple of (host, port)
for the socket to bind as a source address before making the connection.
An host of '' or port 0 tells the OS to use the default.
"""
host, port = address
err = None
> for res in getaddrinfo(host, port, 0, SOCK_STREAM):
af, socktype, proto, canonname, sa = res
E gaierror: [Errno -2] Name or service not known
/usr/lib/python2.7/socket.py:553: gaierror
================ 1 failed, 31 passed, 1 xfailed in 0.27 seconds ================
More information about the Openstack-devel
mailing list