[Telepathy-commits] [telepathy-gabble/master] Verify that gabble sends a streamhost-used tag

Marco Barisione marco at barisione.org
Tue Jan 6 08:41:22 PST 2009


---
 tests/twisted/tubes/test-si-socks5-tubes.py |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/tests/twisted/tubes/test-si-socks5-tubes.py b/tests/twisted/tubes/test-si-socks5-tubes.py
index 3979984..0480a5e 100644
--- a/tests/twisted/tubes/test-si-socks5-tubes.py
+++ b/tests/twisted/tubes/test-si-socks5-tubes.py
@@ -306,9 +306,16 @@ def test(q, bus, conn, stream):
     assert event.properties['data'].endswith('\x00\x00')
 
     event.properties['transport'].write('\x05\x00') #version 5, ok
-    q.expect('stream-iq', iq_type='result')
+    previous_event = event
 
-    event.properties['transport'].write("HELLO WORLD")
+    event = q.expect('stream-iq', iq_type='result')
+    iq = event.stanza
+    query = xpath.queryForNodes('/iq/query', iq)[0]
+    assert query.uri == NS_BYTESTREAMS
+    streamhost_used = xpath.queryForNodes('/query/streamhost-used', query)[0]
+    assert streamhost_used['jid'] == 'bob at localhost/Bob'
+
+    previous_event.properties['transport'].write("HELLO WORLD")
     event = q.expect('s5b-data-received')
     assert event.properties['data'] == 'hello world'
 
-- 
1.5.6.5




More information about the Telepathy-commits mailing list