[telepathy-gabble/master] test-set-status-idempotence.py: catch the initial stream-presence when connecting

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Tue Jul 28 07:06:01 PDT 2009


That way it won't interfere with the future stream-presence send when we
change our status.
---
 tests/twisted/test-set-status-idempotence.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/twisted/test-set-status-idempotence.py b/tests/twisted/test-set-status-idempotence.py
index 3e3bba5..28ee670 100644
--- a/tests/twisted/test-set-status-idempotence.py
+++ b/tests/twisted/test-set-status-idempotence.py
@@ -13,7 +13,9 @@ ispresence = u'org.freedesktop.Telepathy.Connection.Interface.SimplePresence'
 def test_presence(q, bus, conn, stream):
     conn.Connect()
 
-    q.expect('dbus-signal', signal='StatusChanged', args=[0, 1])
+    q.expect_many(
+        EventPattern('dbus-signal', signal='StatusChanged', args=[0, 1]),
+        EventPattern('stream-presence'))
 
     iface = dbus.Interface (conn,
         u'org.freedesktop.Telepathy.Connection.Interface.Presence')
@@ -29,7 +31,9 @@ def test_presence(q, bus, conn, stream):
 def test_simple_presence(q, bus, conn, stream):
     conn.Connect()
 
-    q.expect('dbus-signal', signal='StatusChanged', args=[0, 1])
+    q.expect_many(
+        EventPattern('dbus-signal', signal='StatusChanged', args=[0, 1]),
+        EventPattern('stream-presence'))
 
     iface = dbus.Interface (conn, ispresence)
     run_test(q, bus, conn, stream,
-- 
1.5.6.5



More information about the telepathy-commits mailing list