diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-10 15:12:08 -0400 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-11 17:55:05 -0400 |
commit | a1ef146939a5e66bea10cbd0044a04e324b43d32 (patch) | |
tree | 4b169846c0b5203458098d4ae36a27d28b94d782 | |
parent | 3fec64d916f3f392e151c9404658d8428e5bde99 (diff) |
tests/twisted/text/test-text-no-body.py: stop waiting for NewChannel
-rw-r--r-- | 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 62773dc97..34e54b7bb 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@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@foo.com', jid) if __name__ == '__main__': exec_test(test) |