diff options
author | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2013-09-20 17:19:43 -0400 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-15 15:42:31 -0400 |
commit | 82162a775b73ec8fc6bac7ff2c3efa7592554916 (patch) | |
tree | e0a8852722e3976b8b99743bc227cc2889ceca03 /tests/twisted/avahi/text-channel.py | |
parent | 822ddd064c266345ab4fe19c4b574a4cd29d7159 (diff) | |
download | telepathy-salut-82162a775b73ec8fc6bac7ff2c3efa7592554916.tar.gz |
Port to telepathy-glib-1
Diffstat (limited to 'tests/twisted/avahi/text-channel.py')
-rw-r--r-- | tests/twisted/avahi/text-channel.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/twisted/avahi/text-channel.py b/tests/twisted/avahi/text-channel.py index b37b1c2f..acaed6a2 100644 --- a/tests/twisted/avahi/text-channel.py +++ b/tests/twisted/avahi/text-channel.py @@ -34,7 +34,9 @@ def test(q, bus, conn): cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT, cs.TARGET_HANDLE: handle})[0] text_channel = make_channel_proxy(conn, t, "Channel.Type.Text") - text_channel.Send(cs.MT_NORMAL, INCOMING_MESSAGE) + text_channel.SendMessage([{'message-type': cs.MT_NORMAL}, + {'content-type': 'text/plain', + 'content': INCOMING_MESSAGE}], 0) e = q.expect('incoming-connection', listener = listener) incoming = e.connection @@ -76,11 +78,12 @@ def test(q, bus, conn): e.connection.send(message) - e = q.expect('dbus-signal', signal='Received') - assert e.args[2] == handle - assert e.args[3] == cs.MT_NORMAL - assert e.args[5] == OUTGOING_MESSAGE - + e = q.expect('dbus-signal', signal='MessageReceived') + assert len(e.args[0]) == 2 + assert e.args[0][0]['message-sender-id'] == contact_name + assert e.args[0][0]['message-sender'] == handle + assert e.args[0][0]['message-type'] == cs.MT_NORMAL + assert e.args[0][1]['content'] == OUTGOING_MESSAGE if __name__ == '__main__': exec_test(test) |