[Telepathy-commits] [telepathy-gabble/master] bytestream.py: add parse_si_reply
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Thu Feb 19 04:04:59 PST 2009
---
tests/twisted/bytestream.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/tests/twisted/bytestream.py b/tests/twisted/bytestream.py
index 403321b..4f9d306 100644
--- a/tests/twisted/bytestream.py
+++ b/tests/twisted/bytestream.py
@@ -30,6 +30,14 @@ def create_si_offer(stream, from_, to, sid, profile, bytestreams):
return iq, si
+def parse_si_reply(iq):
+ si = xpath.queryForNodes('/iq/si[@xmlns="%s"]' % ns.SI,
+ iq)[0]
+ value = xpath.queryForNodes('/si/feature/x/field/value', si)
+ assert len(value) == 1
+ proto = value[0]
+ return str(proto)
+
##### XEP-0065: SOCKS5 Bytestreams #####
class S5BProtocol(Protocol):
--
1.5.6.5
More information about the telepathy-commits
mailing list