[telepathy-gabble/master] caps/compat-bundles.py, caps_helper.py: be more specific about the IQ we expect

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Sep 10 04:39:59 PDT 2009


Otherwise, this test could get confused by seeing the test code send a
reply to Gabble's pubsub disco request.
---
 tests/twisted/caps/compat-bundles.py |    3 ++-
 tests/twisted/caps_helper.py         |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/twisted/caps/compat-bundles.py b/tests/twisted/caps/compat-bundles.py
index ab9cdb5..e894746 100644
--- a/tests/twisted/caps/compat-bundles.py
+++ b/tests/twisted/caps/compat-bundles.py
@@ -29,7 +29,8 @@ def disco_bundle(q, bus, conn, stream, node, features):
 """
     stream.send(request)
 
-    disco_response = q.expect('stream-iq', query_ns=ns.DISCO_INFO)
+    disco_response = q.expect('stream-iq', query_ns=ns.DISCO_INFO,
+            iq_id='disco1')
     nodes = xpath.queryForNodes('/iq/query/feature', disco_response.stanza)
     vars = [n["var"] for n in nodes]
     assertEquals(set(features), set(vars))
diff --git a/tests/twisted/caps_helper.py b/tests/twisted/caps_helper.py
index 5778909..eb05b32 100644
--- a/tests/twisted/caps_helper.py
+++ b/tests/twisted/caps_helper.py
@@ -210,7 +210,7 @@ def disco_caps(q, stream, presence):
     stream.send(request)
 
     # receive caps
-    event = q.expect('stream-iq', query_ns=ns.DISCO_INFO)
+    event = q.expect('stream-iq', query_ns=ns.DISCO_INFO, iq_id='disco1')
 
     features = []
     for feature in xpath.queryForNodes('/iq/query/feature', event.stanza):
-- 
1.5.6.5




More information about the telepathy-commits mailing list