[Telepathy-commits] [telepathy-gabble/master] olpc-activity-search.py: use sync_stream instead of our own crack

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Sep 26 10:02:10 PDT 2008


20080522082959-7fe3f-7264349e4aec48bb25fdfaceff6581d91d8b1c3a.gz
---
 tests/twisted/olpc/olpc-activity-search.py |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/tests/twisted/olpc/olpc-activity-search.py b/tests/twisted/olpc/olpc-activity-search.py
index 980a0cd..ba9e133 100644
--- a/tests/twisted/olpc/olpc-activity-search.py
+++ b/tests/twisted/olpc/olpc-activity-search.py
@@ -5,7 +5,7 @@ test OLPC search activity
 import dbus
 
 from servicetest import call_async, EventPattern
-from gabbletest import exec_test, make_result_iq, acknowledge_iq
+from gabbletest import exec_test, make_result_iq, acknowledge_iq, sync_stream
 
 from twisted.words.xish import domish, xpath
 from twisted.words.protocols.jabber.client import IQ
@@ -59,16 +59,7 @@ def test(q, bus, conn, stream):
     activity_prop_iface = dbus.Interface(conn, 'org.laptop.Telepathy.ActivityProperties')
     activity_iface = dbus.Interface(conn, 'org.laptop.Telepathy.Activity')
 
-    # FIXME: This is crack. We send this message so we can wait for the
-    # NewChannel signal and so be sure than Gabble handled the disco response.
-    message = domish.Element(('jabber:client', 'message'))
-    message['from'] = 'alice at localhost'
-    message['to'] = 'test at localhost'
-    message['type'] = 'chat'
-    body = message.addElement((None, 'body'))
-    body.addContent('hi!')
-    stream.send(message)
-    q.expect('dbus-signal', signal='NewChannel')
+    sync_stream(q, stream)
 
     # request 3 random activities
     call_async(q, activity_iface, 'RequestRandom', 3)
-- 
1.5.6.5




More information about the Telepathy-commits mailing list