summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-10-10 16:16:27 (GMT)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-10-11 21:55:05 (GMT)
commitda29c7cb84870bdaac607c84e51b075224866fcb (patch)
tree9ae668f95d061db444df988dfbcfd80cbca8ef97
parentb392dee1da98b6ba0f2cc8ad01bf9a2e1079c305 (diff)
downloadtelepathy-gabble-da29c7cb84870bdaac607c84e51b075224866fcb.tar.gz
telepathy-gabble-da29c7cb84870bdaac607c84e51b075224866fcb.tar.xz
stop using RequestChannel()
-rw-r--r--tests/twisted/test-debug.py14
-rw-r--r--tests/twisted/text/destroy.py8
-rw-r--r--tests/twisted/text/initiate.py8
-rw-r--r--tests/twisted/text/respawn.py8
4 files changed, 25 insertions, 13 deletions
diff --git a/tests/twisted/test-debug.py b/tests/twisted/test-debug.py
index 83bf1f7..d3662a5 100644
--- a/tests/twisted/test-debug.py
+++ b/tests/twisted/test-debug.py
@@ -34,8 +34,11 @@ def test(q, bus, conn, stream):
assert debug.Properties.Get(cs.DEBUG_IFACE, 'Enabled') == False
debug.Properties.Set(cs.DEBUG_IFACE, 'Enabled', True)
- channel_path = conn.RequestChannel(
- cs.CHANNEL_TYPE_TEXT, cs.HT_CONTACT, conn.Properties.Get(cs.CONN, "SelfHandle"), True)
+ channel_path, props = conn.Requests.CreateChannel({
+ cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT,
+ cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT,
+ cs.TARGET_HANDLE: conn.Properties.Get(cs.CONN, "SelfHandle")
+ })
q.expect('dbus-signal', signal = 'NewDebugMessage')
assert len(messages) > 0
@@ -50,8 +53,11 @@ def test(q, bus, conn, stream):
channel.Close(dbus_interface=cs.CHANNEL)
q.expect('dbus-signal', signal='Closed')
- conn.RequestChannel(
- cs.CHANNEL_TYPE_TEXT, cs.HT_CONTACT, conn.Properties.Get(cs.CONN, "SelfHandle"), True)
+ channel_path, props = conn.Requests.CreateChannel({
+ cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT,
+ cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT,
+ cs.TARGET_HANDLE: conn.Properties.Get(cs.CONN, "SelfHandle")
+ })
q.expect('dbus-signal', signal='NewChannels')
assertEquals (snapshot, messages)
diff --git a/tests/twisted/text/destroy.py b/tests/twisted/text/destroy.py
index da970a4..9b1f3d6 100644
--- a/tests/twisted/text/destroy.py
+++ b/tests/twisted/text/destroy.py
@@ -17,11 +17,13 @@ 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, new_sig = q.expect_many(
- EventPattern('dbus-return', method='RequestChannel'),
+ EventPattern('dbus-return', method='CreateChannel'),
EventPattern('dbus-signal', signal='NewChannels'),
)
diff --git a/tests/twisted/text/initiate.py b/tests/twisted/text/initiate.py
index 780bcc7..a237fc6 100644
--- a/tests/twisted/text/initiate.py
+++ b/tests/twisted/text/initiate.py
@@ -16,11 +16,13 @@ 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'),
)
diff --git a/tests/twisted/text/respawn.py b/tests/twisted/text/respawn.py
index 1d81084..0abc30f 100644
--- a/tests/twisted/text/respawn.py
+++ b/tests/twisted/text/respawn.py
@@ -16,11 +16,13 @@ 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, new_sig = q.expect_many(
- EventPattern('dbus-return', method='RequestChannel'),
+ EventPattern('dbus-return', method='CreateChannel'),
EventPattern('dbus-signal', signal='NewChannels'),
)