[Telepathy-commits] [telepathy-gabble/master] Don't expect TubeStateChanged before a connection has been established

Marco Barisione marco at barisione.org
Tue Jan 6 08:41:30 PST 2009


---
 tests/twisted/tubes/test-si-socks5-tubes.py |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/tests/twisted/tubes/test-si-socks5-tubes.py b/tests/twisted/tubes/test-si-socks5-tubes.py
index b8fca16..d5660be 100644
--- a/tests/twisted/tubes/test-si-socks5-tubes.py
+++ b/tests/twisted/tubes/test-si-socks5-tubes.py
@@ -960,16 +960,13 @@ def test(q, bus, conn, stream):
     streamhost['port'] = '5084'
     stream.send(iq)
 
-    event = q.expect('dbus-return', method='AcceptDBusTube')
+    event, _ = q.expect_many(
+        EventPattern('dbus-return', method='AcceptDBusTube'),
+        EventPattern('s5b-connected'))
     address = event.value[0]
     # FIXME: this is currently broken. See FIXME in tubes-channel.c
     #assert len(address) > 0
 
-    event = q.expect('dbus-signal', signal='TubeStateChanged',
-        args=[69, 2]) # 2 == OPEN
-    id = event.args[0]
-    state = event.args[1]
-
     # OK, we're done
     conn.Disconnect()
 
-- 
1.5.6.5




More information about the Telepathy-commits mailing list