[Telepathy-commits] [telepathy-gabble/master] test-muc-offer-dbus-tube.py: exercise Channel, Group properties in MUC Tubes channels
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Aug 19 10:53:10 PDT 2008
20080606130133-53eee-ecc9962472144399f47ad9586888191b0a8dad72.gz
---
tests/twisted/tubes/test-muc-offer-dbus-tube.py | 28 +++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/tests/twisted/tubes/test-muc-offer-dbus-tube.py b/tests/twisted/tubes/test-muc-offer-dbus-tube.py
index 016ff04..b7feb05 100644
--- a/tests/twisted/tubes/test-muc-offer-dbus-tube.py
+++ b/tests/twisted/tubes/test-muc-offer-dbus-tube.py
@@ -90,8 +90,36 @@ def test(q, bus, conn, stream):
tubes_iface = dbus.Interface(tubes_chan,
tp_name_prefix + '.Channel.Type.Tubes')
+ # Exercise basic Channel Properties from spec 0.17.7
+ channel_props = tubes_chan.GetAll(
+ 'org.freedesktop.Telepathy.Channel',
+ dbus_interface='org.freedesktop.DBus.Properties')
+ assert channel_props.get('TargetHandle') == handles[0],\
+ (channel_props.get('TargetHandle'), handles[0])
+ assert channel_props.get('TargetHandleType') == 2,\
+ channel_props.get('TargetHandleType')
+ assert channel_props.get('ChannelType') == \
+ 'org.freedesktop.Telepathy.Channel.Type.Tubes',\
+ channel_props.get('ChannelType')
+ assert 'Interfaces' in channel_props, channel_props
+ assert 'org.freedesktop.Telepathy.Channel.Interface.Group' in \
+ channel_props['Interfaces'], \
+ channel_props['Interfaces']
+
+ # Exercise Group Properties from spec 0.17.6 (in a basic way)
+ group_props = tubes_chan.GetAll(
+ 'org.freedesktop.Telepathy.Channel.Interface.Group',
+ dbus_interface='org.freedesktop.DBus.Properties')
+ assert 'SelfHandle' in group_props, group_props
+ assert 'HandleOwners' in group_props, group_props
+ assert 'Members' in group_props, group_props
+ assert 'LocalPendingMembers' in group_props, group_props
+ assert 'RemotePendingMembers' in group_props, group_props
+ assert 'GroupFlags' in group_props, group_props
+
tubes_self_handle = tubes_chan.GetSelfHandle(
dbus_interface=tp_name_prefix + '.Channel.Interface.Group')
+ assert group_props['SelfHandle'] == tubes_self_handle
# Offer a D-Bus tube
call_async(q, tubes_iface, 'OfferDBusTube',
--
1.5.6.3
More information about the Telepathy-commits
mailing list