summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2012-09-11 11:06:28 +0200
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-09-11 11:20:36 +0100
commit61cb4d227d1cbbf85d08f94c28036ba9d831f2fb (patch)
tree12d5d6f9e18ae7f41fc15f66c725fb66ac88ec25
parente3aae2b2143c8b851e5814f6711aff75d4a1d197 (diff)
Don't assume NewDebugMessage will occur before NewChannel
-rw-r--r--tests/twisted/test-debug.py5
1 files changed, 4 insertions, 1 deletions
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