telepathy-gabble: tests/twisted/text/test-text-no-body.py: stop waiting for NewChannel

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Fri Oct 11 14:58:34 PDT 2013


Module: telepathy-gabble
Branch: master
Commit: a1ef146939a5e66bea10cbd0044a04e324b43d32
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=a1ef146939a5e66bea10cbd0044a04e324b43d32

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Thu Oct 10 15:12:08 2013 -0400

tests/twisted/text/test-text-no-body.py: stop waiting for NewChannel

---

 tests/twisted/text/test-text-no-body.py |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/twisted/text/test-text-no-body.py b/tests/twisted/text/test-text-no-body.py
index 62773dc..34e54b7 100644
--- a/tests/twisted/text/test-text-no-body.py
+++ b/tests/twisted/text/test-text-no-body.py
@@ -7,6 +7,7 @@ new text channel.
 from twisted.words.xish import domish
 
 from gabbletest import exec_test
+from servicetest import assertEquals
 import constants as cs
 import ns
 
@@ -27,10 +28,11 @@ def test(q, bus, conn, stream):
     stream.send(m)
 
     # first message should be from Bob, not Alice
-    event = q.expect('dbus-signal', signal='NewChannel')
-    assert event.args[1] == cs.CHANNEL_TYPE_TEXT
-    jid = conn.inspect_contact_sync(event.args[3])
-    assert jid == 'bob at foo.com'
+    event = q.expect('dbus-signal', signal='NewChannels')
+    path, props = event.args[0][0]
+    assertEquals(cs.CHANNEL_TYPE_TEXT, props[cs.CHANNEL_TYPE])
+    jid = conn.inspect_contact_sync(props[cs.TARGET_HANDLE])
+    assertEquals('bob at foo.com', jid)
 
 if __name__ == '__main__':
     exec_test(test)



More information about the telepathy-commits mailing list