From 02afbf76f9c82202aff0c893b1eccf3150ec2a85 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 11 Feb 2011 14:01:10 +0000 Subject: [PATCH] ImChannel: include Destroyable in Channel.Interfaces. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I implemented Destroyable over a year ago, but forgot to actually include the interface in the Channel.Interfaces property… Here's a fix, and a test. Fixes: --- src/idle-im-channel.c | 1 + tests/twisted/channels/requests-create.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/idle-im-channel.c b/src/idle-im-channel.c index 7fe7585..0294014 100644 --- a/src/idle-im-channel.c +++ b/src/idle-im-channel.c @@ -72,6 +72,7 @@ enum { const gchar *im_channel_interfaces[] = { TP_IFACE_CHANNEL_INTERFACE_MESSAGES, + TP_IFACE_CHANNEL_INTERFACE_DESTROYABLE, NULL }; diff --git a/tests/twisted/channels/requests-create.py b/tests/twisted/channels/requests-create.py index 64120ec..e3adb64 100644 --- a/tests/twisted/channels/requests-create.py +++ b/tests/twisted/channels/requests-create.py @@ -5,7 +5,9 @@ Most of this test was borrowed from a gabble test and modified to fit idle """ from idletest import exec_test -from servicetest import EventPattern, call_async, make_channel_proxy +from servicetest import ( + EventPattern, call_async, make_channel_proxy, assertContains, +) import dbus import constants as cs @@ -104,6 +106,8 @@ def test(q, bus, conn, stream): assert ms[0][5] == 'oh hai' # Without acknowledging the message, we destroy the channel: + assertContains(cs.CHANNEL_IFACE_DESTROYABLE, + chan.Get(cs.CHANNEL, 'Interfaces', dbus_interface=cs.PROPERTIES_IFACE)) chan.Destroy(dbus_interface=cs.CHANNEL_IFACE_DESTROYABLE) q.expect('dbus-signal', signal='ChannelClosed') -- 1.7.2.3