summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Seidler <pl.seidler@gmail.com>2011-04-03 15:16:37 +0200
committerWill Thompson <will.thompson@collabora.co.uk>2011-07-28 15:56:55 +0100
commit885d9cdc175f58c5490c64d38e585678e8e10ebb (patch)
tree5395f4f8268cf5a261fb4afd4231e6c031e59785
parent147ebf5404c5818aba122e25cf1c7844cbd99a59 (diff)
tests: use localhost
https://bugs.freedesktop.org/show_bug.cgi?id=35968
-rw-r--r--tests/twisted/connect/test-nonblocking-tls.py4
-rw-r--r--tests/twisted/gabbletest.py2
-rw-r--r--tests/twisted/httptest.py2
-rw-r--r--tests/twisted/tubes/tubetestutil.py2
4 files changed, 5 insertions, 5 deletions
diff --git a/tests/twisted/connect/test-nonblocking-tls.py b/tests/twisted/connect/test-nonblocking-tls.py
index 21a37e84e..8d8fbc180 100644
--- a/tests/twisted/connect/test-nonblocking-tls.py
+++ b/tests/twisted/connect/test-nonblocking-tls.py
@@ -104,7 +104,7 @@ if __name__ == '__main__':
factory = twisted.internet.protocol.Factory()
factory.protocol = lambda:stream1
- port1 = reactor.listenTCP(4242, factory)
+ port1 = reactor.listenTCP(4242, factory, interface='localhost')
params = {
'account': 'test2@localhost/Resource',
@@ -119,7 +119,7 @@ if __name__ == '__main__':
factory = twisted.internet.protocol.Factory()
factory.protocol = lambda:stream2
- port1 = reactor.listenTCP(4343, factory)
+ port1 = reactor.listenTCP(4343, factory, interface='localhost')
bus.add_signal_receiver(
diff --git a/tests/twisted/gabbletest.py b/tests/twisted/gabbletest.py
index 598cf4ebe..8ae1ea9a5 100644
--- a/tests/twisted/gabbletest.py
+++ b/tests/twisted/gabbletest.py
@@ -587,7 +587,7 @@ def exec_test_deferred(fun, params, protocol=None, timeout=None,
resource=resource, suffix=suffix))
factory = StreamFactory(streams, jids)
- port = reactor.listenTCP(4242, factory)
+ port = reactor.listenTCP(4242, factory, interface='localhost')
def signal_receiver(*args, **kw):
if kw['path'] == '/org/freedesktop/DBus' and \
diff --git a/tests/twisted/httptest.py b/tests/twisted/httptest.py
index 0042d3d13..1ca1b6d44 100644
--- a/tests/twisted/httptest.py
+++ b/tests/twisted/httptest.py
@@ -28,5 +28,5 @@ class HTTPFactory(http.HTTPFactory):
return protocol
def listen_http(q, port=0):
- return reactor.listenTCP(port, HTTPFactory(q))
+ return reactor.listenTCP(port, HTTPFactory(q), interface='localhost')
diff --git a/tests/twisted/tubes/tubetestutil.py b/tests/twisted/tubes/tubetestutil.py
index 2420585da..3c1a7ca40 100644
--- a/tests/twisted/tubes/tubetestutil.py
+++ b/tests/twisted/tubes/tubetestutil.py
@@ -292,7 +292,7 @@ def create_server(q, address_type, factory=None, block_reading=False,
elif address_type == cs.SOCKET_ADDRESS_TYPE_IPV4:
for port in range(5000,6000):
try:
- reactor.listenTCP(port, factory)
+ reactor.listenTCP(port, factory, interface='localhost')
except CannotListenError:
continue
else: