[Telepathy-commits] [telepathy-salut/master] test-caps-tubes.py: check if the hash matches the announced capabilities
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Thu Feb 26 11:20:28 PST 2009
---
tests/twisted/avahi/test-caps-tubes.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/tests/twisted/avahi/test-caps-tubes.py b/tests/twisted/avahi/test-caps-tubes.py
index 762ebca..541e737 100644
--- a/tests/twisted/avahi/test-caps-tubes.py
+++ b/tests/twisted/avahi/test-caps-tubes.py
@@ -45,6 +45,7 @@ from saluttest import exec_test, make_result_iq, sync_stream
from xmppstream import setup_stream_listener, connect_to_stream
from caps_helper import compute_caps_hash
+from config import PACKAGE_STRING
HT_CONTACT = 1
HT_CONTACT_LIST = 3
@@ -192,6 +193,13 @@ def receive_presence_and_ask_caps(q, stream, service):
query_ns='http://jabber.org/protocol/disco#info')
caps_str = str(xpath.queryForNodes('/iq/query/feature', event.stanza))
+ features = []
+ for feature in xpath.queryForNodes('/iq/query/feature', event.stanza):
+ features.append(feature['var'])
+
+ # Check if the hash matches the announced capabilities
+ assert ver == compute_caps_hash(['client/pc//%s' % PACKAGE_STRING], features, [])
+
return (event, caps_str, signaled_caps)
def caps_contain(event, cap):
--
1.5.6.5
More information about the telepathy-commits
mailing list