summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2013-09-20 13:18:02 -0400
committerXavier Claessens <xavier.claessens@collabora.co.uk>2013-09-24 14:45:10 -0400
commit01a24c642287c473e9d08955c1fef520043bff91 (patch)
treee403182b98849e02fe8e9b4fc3d93d30cbea677c
parent8fabb051095eda36beb2709aa5ac76c938d220ef (diff)
downloadtelepathy-salut-01a24c642287c473e9d08955c1fef520043bff91.tar.gz
SalutTest: stop using ContactList channels
-rw-r--r--tests/twisted/saluttest.py21
1 files changed, 5 insertions, 16 deletions
diff --git a/tests/twisted/saluttest.py b/tests/twisted/saluttest.py
index d622131f..fec5b1ed 100644
--- a/tests/twisted/saluttest.py
+++ b/tests/twisted/saluttest.py
@@ -206,25 +206,14 @@ def wait_for_contact_list(q, conn):
q.expect('dbus-signal', signal='NewChannel')
def wait_for_contact_in_publish(q, bus, conn, contact_name):
- publish_handle = conn.RequestHandles(cs.HT_LIST, ["publish"])[0]
- publish = conn.RequestChannel(cs.CHANNEL_TYPE_CONTACT_LIST,
- cs.HT_LIST, publish_handle, False)
-
handle = 0
# Wait until the record shows up in publish
while handle == 0:
- e = q.expect('dbus-signal', signal='MembersChangedDetailed',
- path=publish)
- # Versions of telepathy-glib prior to 0.14.6 incorrectly used the name
- # 'member-ids'.
- try:
- ids = e.args[4]['contact-ids']
- except KeyError:
- ids = e.args[4]['member-ids']
-
- for h in e.args[0]:
- name = ids[h]
- if name == contact_name:
+ e = q.expect('dbus-signal', signal='ContactsChangedWithID',
+ path=conn.object_path)
+ for h, state in e.args[0].items():
+ name = e.args[1][h]
+ if name == contact_name and state[1] == cs.SUBSCRIPTION_STATE_YES:
handle = h
return handle