summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2013-09-23 16:08:11 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-09-24 12:13:14 +0100
commit2703dff9a8969c5ec5fee369876f95c11493c170 (patch)
tree8323c0611edac667b13a58f2ae5e8c6b5e0e56d8
parentc09d8cc051fb21e698870d4b7fc9771ed55f965c (diff)
downloadtelepathy-haze-2703dff9a8969c5ec5fee369876f95c11493c170.tar.gz
tests: stop calling RequestChannel
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49389 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
-rw-r--r--tests/twisted/text/destroy.py11
-rw-r--r--tests/twisted/text/respawn.py11
2 files changed, 14 insertions, 8 deletions
diff --git a/tests/twisted/text/destroy.py b/tests/twisted/text/destroy.py
index 33b1de1..bb31c8f 100644
--- a/tests/twisted/text/destroy.py
+++ b/tests/twisted/text/destroy.py
@@ -17,11 +17,14 @@ def test(q, bus, conn, stream):
jid = 'foo@bar.com'
foo_handle = conn.get_contact_handle_sync(jid)
- call_async(q, conn, 'RequestChannel', cs.CHANNEL_TYPE_TEXT,
- cs.HT_CONTACT, foo_handle, True)
+ call_async(q, conn.Requests, 'CreateChannel',
+ { cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT,
+ cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT,
+ cs.TARGET_HANDLE: foo_handle,
+ })
ret, sig = q.expect_many(
- EventPattern('dbus-return', method='RequestChannel'),
+ EventPattern('dbus-return', method='CreateChannel'),
EventPattern('dbus-signal', signal='NewChannels'),
)
@@ -33,7 +36,7 @@ def test(q, bus, conn, stream):
assertLength(1, sig.args)
assertLength(1, sig.args[0]) # one channel
assertLength(2, sig.args[0][0]) # two struct members
- assertEquals(ret.value[0], sig.args[0][0][0])
+ assertEquals(ret.value, sig.args[0][0])
emitted_props = sig.args[0][0][1]
assertEquals(cs.CHANNEL_TYPE_TEXT, emitted_props[cs.CHANNEL_TYPE])
assertEquals(cs.HT_CONTACT, emitted_props[cs.TARGET_HANDLE_TYPE])
diff --git a/tests/twisted/text/respawn.py b/tests/twisted/text/respawn.py
index 6bcc059..170c331 100644
--- a/tests/twisted/text/respawn.py
+++ b/tests/twisted/text/respawn.py
@@ -16,11 +16,14 @@ def test(q, bus, conn, stream):
jid = 'foo@bar.com'
foo_handle = conn.get_contact_handle_sync(jid)
- call_async(q, conn, 'RequestChannel', cs.CHANNEL_TYPE_TEXT,
- cs.HT_CONTACT, foo_handle, True)
+ call_async(q, conn.Requests, 'CreateChannel',
+ { cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT,
+ cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT,
+ cs.TARGET_HANDLE: foo_handle,
+ })
ret, sig = q.expect_many(
- EventPattern('dbus-return', method='RequestChannel'),
+ EventPattern('dbus-return', method='CreateChannel'),
EventPattern('dbus-signal', signal='NewChannels'),
)
@@ -31,7 +34,7 @@ def test(q, bus, conn, stream):
assertLength(1, sig.args)
assertLength(1, sig.args[0]) # one channel
assertLength(2, sig.args[0][0]) # two struct members
- assertEquals(ret.value[0], sig.args[0][0][0])
+ assertEquals(ret.value, sig.args[0][0])
emitted_props = sig.args[0][0][1]
assertEquals(cs.CHANNEL_TYPE_TEXT, emitted_props[cs.CHANNEL_TYPE])
assertEquals(cs.HT_CONTACT, emitted_props[cs.TARGET_HANDLE_TYPE])