diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-10 12:16:27 -0400 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-11 17:55:05 -0400 |
commit | da29c7cb84870bdaac607c84e51b075224866fcb (patch) | |
tree | 9ae668f95d061db444df988dfbcfd80cbca8ef97 | |
parent | b392dee1da98b6ba0f2cc8ad01bf9a2e1079c305 (diff) |
stop using RequestChannel()
-rw-r--r-- | tests/twisted/test-debug.py | 14 | ||||
-rw-r--r-- | tests/twisted/text/destroy.py | 8 | ||||
-rw-r--r-- | tests/twisted/text/initiate.py | 8 | ||||
-rw-r--r-- | tests/twisted/text/respawn.py | 8 |
4 files changed, 25 insertions, 13 deletions
diff --git a/tests/twisted/test-debug.py b/tests/twisted/test-debug.py index 83bf1f7dd..d3662a536 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 da970a470..9b1f3d657 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 780bcc7e6..a237fc663 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 1d8108455..0abc30fb1 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'), ) |