diff options
author | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2013-09-20 17:19:43 -0400 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-15 15:42:31 -0400 |
commit | 82162a775b73ec8fc6bac7ff2c3efa7592554916 (patch) | |
tree | e0a8852722e3976b8b99743bc227cc2889ceca03 /tests/twisted/saluttest.py | |
parent | 822ddd064c266345ab4fe19c4b574a4cd29d7159 (diff) | |
download | telepathy-salut-82162a775b73ec8fc6bac7ff2c3efa7592554916.tar.gz |
Port to telepathy-glib-1
Diffstat (limited to 'tests/twisted/saluttest.py')
-rw-r--r-- | tests/twisted/saluttest.py | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/tests/twisted/saluttest.py b/tests/twisted/saluttest.py index fec5b1ed..0517730e 100644 --- a/tests/twisted/saluttest.py +++ b/tests/twisted/saluttest.py @@ -54,7 +54,7 @@ def make_connection(bus, event_func, params=None): default_params.update(params) return servicetest.make_connection(bus, event_func, 'salut', - 'local-xmpp', default_params) + 'local_xmpp', default_params) def ensure_avahi_is_running(): bus = dbus.SystemBus() @@ -185,31 +185,11 @@ def exec_test(fun, params=None, protocol=None, timeout=None, make_conn) reactor.run() -def wait_for_contact_list(q, conn): - """Request contact list channels and wait for their NewChannel signals. - This is useful to avoid these signals to interfere with your test.""" - - #FIXME: this maybe racy if there are other contacts connected - requestotron = dbus.Interface(conn, cs.CONN_IFACE_REQUESTS) - - # publish - requestotron.EnsureChannel({ - cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_CONTACT_LIST, - cs.TARGET_HANDLE_TYPE: cs.HT_LIST, - cs.TARGET_ID: 'publish'}) - q.expect('dbus-signal', signal='NewChannel') - # subscribe - requestotron.EnsureChannel({ - cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_CONTACT_LIST, - cs.TARGET_HANDLE_TYPE: cs.HT_LIST, - cs.TARGET_ID: 'subscribe'}) - q.expect('dbus-signal', signal='NewChannel') - def wait_for_contact_in_publish(q, bus, conn, contact_name): handle = 0 # Wait until the record shows up in publish while handle == 0: - e = q.expect('dbus-signal', signal='ContactsChangedWithID', + e = q.expect('dbus-signal', signal='ContactsChanged', path=conn.object_path) for h, state in e.args[0].items(): name = e.args[1][h] |