[Telepathy-commits] [telepathy-gabble/master] Check that the creator attribute is set correctly
Sjoerd Simons
sjoerd.simons at collabora.co.uk
Sun Mar 1 13:06:41 PST 2009
---
.../twisted/jingle/test-content-adding-removal.py | 2 ++
tests/twisted/jingle/test-content-complex.py | 5 ++++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/tests/twisted/jingle/test-content-adding-removal.py b/tests/twisted/jingle/test-content-adding-removal.py
index 73ef3d5..a707e78 100644
--- a/tests/twisted/jingle/test-content-adding-removal.py
+++ b/tests/twisted/jingle/test-content-adding-removal.py
@@ -125,6 +125,8 @@ def test(q, bus, conn, stream):
e = q.expect('stream-iq')
assert e.query.name == 'jingle'
assert e.query['action'] == 'content-add'
+ c = e.query.firstChildElement ()
+ assert c['creator'] == 'initiator', c['creator'] + " should be initiator"
stream.send(gabbletest.make_result_iq(stream, e.stanza))
iq, jingle = jt._jingle_stanza('content-accept')
diff --git a/tests/twisted/jingle/test-content-complex.py b/tests/twisted/jingle/test-content-complex.py
index bf21bb4..ea077bf 100644
--- a/tests/twisted/jingle/test-content-complex.py
+++ b/tests/twisted/jingle/test-content-complex.py
@@ -151,9 +151,12 @@ def worker(jp, q, bus, conn, stream):
e = q.expect('stream-iq', iq_type='set', predicate=lambda x:
xpath.queryForNodes("/iq/jingle[@action='content-add']",
x.stanza))
- stream.send(jp.xml(jp.ResultIq('test at localhost', e.stanza, [])))
c = e.query.firstChildElement()
+ assert c['creator'] == 'responder', c['creator']
+
+ stream.send(jp.xml(jp.ResultIq('test at localhost', e.stanza, [])))
+
# Remote end rejects it
node = jp.SetIq(jt2.peer, jt2.jid, [
--
1.5.6.5
More information about the telepathy-commits
mailing list