[Telepathy-commits] [telepathy-gabble/master] Twisted tests: move dbus_sync to servicetest.py

Alban Crequy alban.crequy at collabora.co.uk
Tue Aug 19 10:52:48 PDT 2008


20080528105813-a41c0-efe2a7fa4a28940998b2aba0ca856e330c092584.gz
---
 tests/twisted/servicetest.py    |    5 +++++
 tests/twisted/test-caps-hash.py |    8 +-------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py
index 9cfbdf2..4dcdf69 100644
--- a/tests/twisted/servicetest.py
+++ b/tests/twisted/servicetest.py
@@ -363,6 +363,11 @@ def call_async(test, proxy, method, *args, **kw):
     kw.update({'reply_handler': reply_func, 'error_handler': error_func})
     method_proxy(*args, **kw)
 
+def dbus_sync(bus, q, conn):
+    # Dummy D-Bus method call
+    call_async(q, conn, "InspectHandles", 1, [])
+
+    event = q.expect('dbus-return', method='InspectHandles')
 
 class ProxyWrapper:
     def __init__(self, object, default, others):
diff --git a/tests/twisted/test-caps-hash.py b/tests/twisted/test-caps-hash.py
index 8f03505..0b098bc 100644
--- a/tests/twisted/test-caps-hash.py
+++ b/tests/twisted/test-caps-hash.py
@@ -26,7 +26,7 @@ import sys
 from twisted.words.xish import domish, xpath
 
 from gabbletest import exec_test, make_result_iq
-from servicetest import call_async
+from servicetest import dbus_sync
 
 gabble_service = 'org.freedesktop.Telepathy.ConnectionManager.gabble'
 text = 'org.freedesktop.Telepathy.Channel.Type.Text'
@@ -64,12 +64,6 @@ def presence_add_caps(presence, ver, client, hash=None):
         c['hash'] = hash
     return presence
 
-def dbus_sync(bus, q, conn):
-    # Dummy D-Bus method call
-    call_async(q, conn, "InspectHandles", 1, [])
-
-    event = q.expect('dbus-return', method='InspectHandles')
-
 def test_hash(q, bus, conn, stream, contact, contact_handle, client):
     global caps_changed_flag
 
-- 
1.5.6.3




More information about the Telepathy-commits mailing list