[telepathy-gabble/master] unrace jingle/google-relay.py

Will Thompson will.thompson at collabora.co.uk
Thu Jun 25 09:50:54 PDT 2009


---
 tests/twisted/jingle/google-relay.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/twisted/jingle/google-relay.py b/tests/twisted/jingle/google-relay.py
index 999aacd..51b0439 100644
--- a/tests/twisted/jingle/google-relay.py
+++ b/tests/twisted/jingle/google-relay.py
@@ -278,12 +278,13 @@ def test(q, bus, conn, stream, incoming=True, too_slow=None):
     media_chan.RemoveMembers([self_handle], '')
 
     if incoming:
-        iq, signal = q.expect_many(
-            EventPattern('stream-iq'),
+        q.expect_many(
+            EventPattern('stream-iq',
+                predicate=lambda e: e.query is not None and
+                    e.query.name == 'jingle' and
+                    e.query['action'] == 'session-terminate'),
             EventPattern('dbus-signal', signal='Closed'),
             )
-        assert iq.query.name == 'jingle'
-        assert iq.query['action'] == 'session-terminate'
     else:
         # We haven't sent a session-initiate, so we shouldn't expect to send a
         # session-terminate.
-- 
1.5.6.5




More information about the telepathy-commits mailing list