telepathy-gabble: use properties instead of Group getters
Guillaume Desmottes
gdesmott at kemper.freedesktop.org
Fri Oct 11 14:58:34 PDT 2013
Module: telepathy-gabble
Branch: master
Commit: 102af3144c6bb66a49021acfa2b1e99e872df82a
URL: http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=102af3144c6bb66a49021acfa2b1e99e872df82a
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Thu Oct 10 15:30:02 2013 -0400
use properties instead of Group getters
---
tests/twisted/muc/test-muc-invitation.py | 10 +++++-----
tests/twisted/muc/test-muc-ownership.py | 9 +++++----
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/tests/twisted/muc/test-muc-invitation.py b/tests/twisted/muc/test-muc-invitation.py
index ea7419a..6cc8efc 100644
--- a/tests/twisted/muc/test-muc-invitation.py
+++ b/tests/twisted/muc/test-muc-invitation.py
@@ -29,22 +29,22 @@ def test(q, bus, conn, stream):
text_chan = wrap_channel(bus.get_object(conn.bus_name, path), 'Text')
- members = text_chan.Group.GetMembers()
- local_pending = text_chan.Group.GetLocalPendingMembers()
- remote_pending = text_chan.Group.GetRemotePendingMembers()
+ members = text_chan.Properties.Get(cs.CHANNEL_IFACE_GROUP, 'Members')
+ local_pending = text_chan.Properties.Get(cs.CHANNEL_IFACE_GROUP, 'LocalPendingMembers')
+ remote_pending = text_chan.Properties.Get(cs.CHANNEL_IFACE_GROUP, 'RemotePendingMembers')
assert len(members) == 1
assert conn.inspect_contact_sync(members[0]) == 'bob at localhost'
bob_handle = members[0]
assert len(local_pending) == 1
# FIXME: the username-part-is-nickname assumption
- assert conn.inspect_contact_sync(local_pending[0]) == \
+ assert conn.inspect_contact_sync(local_pending[0][0]) == \
'chat at conf.localhost/test'
assert len(remote_pending) == 0
room_self_handle = text_chan.Properties.Get(cs.CHANNEL_IFACE_GROUP,
"SelfHandle")
- assert room_self_handle == local_pending[0]
+ assert room_self_handle == local_pending[0][0]
channel_props = text_chan.Properties.GetAll(cs.CHANNEL)
assert channel_props['TargetID'] == 'chat at conf.localhost', channel_props
diff --git a/tests/twisted/muc/test-muc-ownership.py b/tests/twisted/muc/test-muc-ownership.py
index d5d97b9..7de9e9b 100644
--- a/tests/twisted/muc/test-muc-ownership.py
+++ b/tests/twisted/muc/test-muc-ownership.py
@@ -1,7 +1,7 @@
"""
Test support for the HANDLE_OWNERS_NOT_AVAILABLE group flag, and calling
-GetHandleOwners on MUC members.
+HandleOwners on MUC members.
By default, MUC channels should have the flag set. The flag should be unset
when presence is received that includes the MUC JID's owner JID.
@@ -83,9 +83,10 @@ def test(q, bus, conn, stream):
chan = wrap_channel(bus.get_object(conn.bus_name, event.value[0]), 'Text')
- # Exercise GetHandleOwners
- assertEquals([che_owner, chris_owner],
- chan.Group.GetHandleOwners([che, chris]))
+ # Exercise HandleOwners
+ owners = chan.Properties.Get(cs.CHANNEL_IFACE_GROUP, 'HandleOwners')
+ assertEquals(che_owner, owners[che])
+ assertEquals(chris_owner, owners[chris])
# Exercise D-Bus properties
all = chan.Properties.GetAll(cs.CHANNEL_IFACE_GROUP)
More information about the telepathy-commits
mailing list