From 61cb4d227d1cbbf85d08f94c28036ba9d831f2fb Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Tue, 11 Sep 2012 11:06:28 +0200 Subject: Don't assume NewDebugMessage will occur before NewChannel --- tests/twisted/test-debug.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/twisted/test-debug.py b/tests/twisted/test-debug.py index 637d48f38..d9c18183e 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 -- cgit v1.2.3