[telepathy-gabble/telepathy-gabble-0.8] Make caching-our-own-caps test more explicit

Will Thompson will.thompson at collabora.co.uk
Wed Oct 7 05:15:28 PDT 2009


---
 tests/twisted/caps/trust-thyself.py |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/tests/twisted/caps/trust-thyself.py b/tests/twisted/caps/trust-thyself.py
index 518a6bb..930f3d0 100644
--- a/tests/twisted/caps/trust-thyself.py
+++ b/tests/twisted/caps/trust-thyself.py
@@ -18,6 +18,12 @@ def test(q, bus, conn, stream):
 
     jid = 'lol at great.big/omg'
 
+    # Gabble shouldn't send any disco requests to our contact during this test.
+    q.forbid_events([
+        EventPattern('stream-iq', to=jid, iq_type='get',
+            query_ns=ns.DISCO_INFO),
+    ])
+
     # Check that Gabble doesn't disco other clients with the same caps hash.
     p = make_presence(jid,
         caps={'node': c['node'],
@@ -25,11 +31,6 @@ def test(q, bus, conn, stream):
               'ver':  c['ver'],
              })
     stream.send(p)
-
-    q.forbid_events([
-        EventPattern('stream-iq', to=jid, iq_type='get',
-            query_ns=ns.DISCO_INFO),
-    ])
     sync_stream(q, stream)
 
     # Check that Gabble doesn't disco its own ext='' bundles (well, its own
-- 
1.5.6.5



More information about the telepathy-commits mailing list