[Telepathy-commits] [telepathy-gabble/master] test-si-tubes.py: Check that tube offers contains @to with the resource

Alban Crequy alban.crequy at collabora.co.uk
Wed Nov 12 07:20:43 PST 2008


---
 tests/twisted/tubes/test-si-tubes.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/tubes/test-si-tubes.py b/tests/twisted/tubes/test-si-tubes.py
index 21f9859..25ed9eb 100644
--- a/tests/twisted/tubes/test-si-tubes.py
+++ b/tests/twisted/tubes/test-si-tubes.py
@@ -367,6 +367,8 @@ def test(q, bus, conn, stream):
 
     event = q.expect('stream-message')
     message = event.stanza
+    offer_nodes = xpath.queryForNodes('/message', message)
+    assert offer_nodes[0]['to'] == 'bob at localhost/Bob' # check the resource
     tube_nodes = xpath.queryForNodes('/message/tube[@xmlns="%s"]' % NS_TUBES,
         message)
     assert tube_nodes is not None
@@ -449,6 +451,8 @@ def test(q, bus, conn, stream):
 
     event = q.expect('stream-message')
     message = event.stanza
+    offer_nodes = xpath.queryForNodes('/message', message)
+    assert offer_nodes[0]['to'] == 'bob at localhost/Bob' # check the resource
     tube_nodes = xpath.queryForNodes('/message/tube[@xmlns="%s"]' % NS_TUBES,
         message)
     assert tube_nodes is not None
-- 
1.5.6.5




More information about the Telepathy-commits mailing list