[telepathy-gabble/master] accept-private-stream-tube: use connect_socket

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Wed Apr 29 09:40:41 PDT 2009


---
 tests/twisted/tubes/accept-private-stream-tube.py |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/tests/twisted/tubes/accept-private-stream-tube.py b/tests/twisted/tubes/accept-private-stream-tube.py
index afb67e4..5536039 100644
--- a/tests/twisted/tubes/accept-private-stream-tube.py
+++ b/tests/twisted/tubes/accept-private-stream-tube.py
@@ -10,7 +10,7 @@ Receives several tube offers:
 
 import dbus
 
-from servicetest import call_async, EventPattern, EventProtocolClientFactory, sync_dbus
+from servicetest import call_async, EventPattern, sync_dbus
 from gabbletest import acknowledge_iq
 
 from twisted.words.xish import domish, xpath
@@ -188,9 +188,7 @@ def test(q, bus, conn, stream, bytestream_cls,
             args=[stream_tube_id, 2]))
 
     socket_address = accept_return_event.value[0]
-
-    factory = EventProtocolClientFactory(q)
-    reactor.connectUNIX(socket_address, factory)
+    t.connect_socket(q, address_type, socket_address)
 
     bytestream = expect_tube_activity(q, bus, conn, stream, bytestream_cls)
     tubes_chan.Close()
@@ -210,9 +208,7 @@ def test(q, bus, conn, stream, bytestream_cls,
             args=[stream_tube_id, 2]))
 
     socket_address = accept_return_event.value[0]
-
-    factory = EventProtocolClientFactory(q)
-    reactor.connectUNIX(socket_address, factory)
+    t.connect_socket(q, address_type, socket_address)
 
     bytestream = expect_tube_activity(q, bus, conn, stream, bytestream_cls)
     tubes_chan.Close()
@@ -232,9 +228,7 @@ def test(q, bus, conn, stream, bytestream_cls,
             args=[stream_tube_id, 2]))
 
     socket_address = accept_return_event.value[0]
-
-    factory = EventProtocolClientFactory(q)
-    reactor.connectUNIX(socket_address, factory)
+    t.connect_socket(q, address_type, socket_address)
 
     bytestream = expect_tube_activity(q, bus, conn, stream, bytestream_cls)
     tubes_chan.Close()
@@ -255,8 +249,7 @@ def test(q, bus, conn, stream, bytestream_cls,
 
     socket_address = accept_return_event.value[0]
 
-    factory = EventProtocolClientFactory(q)
-    reactor.connectUNIX(socket_address, factory)
+    t.connect_socket(q, address_type, socket_address)
 
     bytestream = expect_tube_activity(q, bus, conn, stream, bytestream_cls)
     tubes_chan.Close()
-- 
1.5.6.5




More information about the telepathy-commits mailing list