[Telepathy-commits] [telepathy-gabble/master] Twisted test: let the port of the jabber server be parametrable

Alban Crequy alban.crequy at collabora.co.uk
Tue Aug 19 10:52:49 PDT 2008


20080602184037-a41c0-e7ded86a66aa6e682665833a9d3c6c6bc3f3e6eb.gz
---
 tests/twisted/gabbletest.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/twisted/gabbletest.py b/tests/twisted/gabbletest.py
index bf3fbfa..eafa0b9 100644
--- a/tests/twisted/gabbletest.py
+++ b/tests/twisted/gabbletest.py
@@ -219,7 +219,7 @@ def make_connection(bus, event_func, params=None):
     return servicetest.make_connection(bus, event_func, 'gabble', 'jabber',
         default_params)
 
-def make_stream(event_func, authenticator=None, protocol=None):
+def make_stream(event_func, authenticator=None, protocol=None, port=4242):
     # set up Jabber server
 
     if authenticator is None:
@@ -231,7 +231,7 @@ def make_stream(event_func, authenticator=None, protocol=None):
     stream = protocol(event_func, authenticator)
     factory = twisted.internet.protocol.Factory()
     factory.protocol = lambda *args: stream
-    reactor.listenTCP(4242, factory)
+    reactor.listenTCP(port, factory)
     return stream
 
 def go(params=None, authenticator=None, protocol=None, start=None):
-- 
1.5.6.3




More information about the Telepathy-commits mailing list