telepathy-gabble: Don't assume NewDebugMessage will occur before NewChannel

Simon McVittie smcv at kemper.freedesktop.org
Tue Sep 11 04:26:46 PDT 2012


Module: telepathy-gabble
Branch: master
Commit: 61cb4d227d1cbbf85d08f94c28036ba9d831f2fb
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=61cb4d227d1cbbf85d08f94c28036ba9d831f2fb

Author: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
Date:   Tue Sep 11 11:06:28 2012 +0200

Don't assume NewDebugMessage will occur before NewChannel

---

 tests/twisted/test-debug.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tests/twisted/test-debug.py b/tests/twisted/test-debug.py
index 637d48f..d9c1818 100644
--- a/tests/twisted/test-debug.py
+++ b/tests/twisted/test-debug.py
@@ -6,6 +6,7 @@ Test the debug message interface.
 import dbus
 
 from servicetest import assertEquals, sync_dbus, call_async, ProxyWrapper
+from servicetest import EventPattern
 from gabbletest import exec_test
 import constants as cs
 from config import DEBUGGING
@@ -38,7 +39,9 @@ def test(q, bus, conn, stream):
 
     channel_path = conn.RequestChannel(
         cs.CHANNEL_TYPE_TEXT, cs.HT_CONTACT, conn.GetSelfHandle(), True)
-    q.expect('dbus-signal', signal='NewChannel')
+    q.expect_many(
+        EventPattern ('dbus-signal', signal='NewChannel'),
+        EventPattern ('dbus-signal', signal = 'NewDebugMessage'))
 
     assert len(messages) > 0
 



More information about the telepathy-commits mailing list