[Telepathy-commits] [telepathy-gabble/master] test-muc-ownership: exercise D-Bus properties

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Aug 19 10:53:03 PDT 2008


20080526161139-53eee-27c212e016f84409063ee1e6875b948a3389f779.gz
---
 tests/twisted/muc/test-muc-ownership.py |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/tests/twisted/muc/test-muc-ownership.py b/tests/twisted/muc/test-muc-ownership.py
index 2179347..d25bfbf 100644
--- a/tests/twisted/muc/test-muc-ownership.py
+++ b/tests/twisted/muc/test-muc-ownership.py
@@ -119,13 +119,27 @@ def test(q, bus, conn, stream):
         'chris at foo.com']
 
     event = q.expect('dbus-return', method='RequestChannel')
-    # Check that GetHandleOwners works.
+
     bus = dbus.SessionBus()
     chan = bus.get_object(conn.bus_name, event.value[0])
     group = dbus.Interface(chan,
         'org.freedesktop.Telepathy.Channel.Interface.Group')
+    props = dbus.Interface(chan,
+        'org.freedesktop.DBus.Properties')
+
+    # Exercise GetHandleOwners
     assert group.GetHandleOwners([5, 7]) == [6, 8]
 
+    # Exercise D-Bus properties
+    all = props.GetAll('org.freedesktop.Telepathy.Channel.Interface.Group')
+
+    assert all[u'LocalPendingMembers'] == [], all
+    assert all[u'Members'] == [2, 3, 4, 5, 7], all
+    assert all[u'RemotePendingMembers'] == [], all
+    assert all[u'SelfHandle'] == 2, all
+    assert all[u'HandleOwners'] == { 2: 0, 3: 0, 4: 0, 5: 6, 7: 8 }, all
+    assert (all[u'GroupFlags'] & 2048) == 2048, all.get('GroupFlags')
+
     conn.Disconnect()
 
     q.expect('dbus-signal', signal='StatusChanged', args=[2, 1])
-- 
1.5.6.3




More information about the Telepathy-commits mailing list