telepathy-gabble: servicetest: simplify sync_dbus() to the version from MC
Simon McVittie
smcv at kemper.freedesktop.org
Thu Sep 26 06:20:43 PDT 2013
Module: telepathy-gabble
Branch: master
Commit: 6786d7159046a957d3f6aa679bdee8defafa9933
URL: http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=6786d7159046a957d3f6aa679bdee8defafa9933
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Wed Sep 25 17:13:28 2013 +0100
servicetest: simplify sync_dbus() to the version from MC
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69822
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
---
tests/twisted/servicetest.py | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py
index b25fe42..c464d8f 100644
--- a/tests/twisted/servicetest.py
+++ b/tests/twisted/servicetest.py
@@ -569,17 +569,13 @@ def call_async(test, proxy, method, *args, **kw):
kw.update({'reply_handler': reply_func, 'error_handler': error_func})
method_proxy(*args, **kw)
-def sync_dbus(bus, q, conn):
+def sync_dbus(bus, q, proxy):
# Dummy D-Bus method call. We can't use DBus.Peer.Ping() because libdbus
# replies to that message immediately, rather than handing it up to
- # dbus-glib and thence Gabble, which means that Ping()ing Gabble doesn't
- # ensure that it's processed all D-Bus messages prior to our ping.
- #
- # This won't do the right thing unless the proxy has a unique name.
- assert conn.object.bus_name.startswith(':')
- root_object = bus.get_object(conn.object.bus_name, '/', introspect=False)
- call_async(q,
- dbus.Interface(root_object, cs.PREFIX + '.Tests'),
+ # dbus-glib and thence the application, which means that Ping()ing the
+ # application doesn't ensure that it's processed all D-Bus messages prior
+ # to our ping.
+ call_async(q, dbus.Interface(proxy, 'org.freedesktop.Telepathy.Tests'),
'DummySyncDBus')
q.expect('dbus-error', method='DummySyncDBus')
More information about the telepathy-commits
mailing list