summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-02-18 16:08:23 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2010-02-18 17:24:50 +0000
commitca98be6ea749fed8a5863073ec8e4e9906a0a94d (patch)
treee0d557ec6c590afe2d2503bd964d22dbd1e86e0e
parent1d732ed2d07652e47ccab4dbdef85796d57ab7fa (diff)
downloadtelepathy-gabble-ca98be6ea749fed8a5863073ec8e4e9906a0a94d.tar.gz
Building stanzas with string concat makes me sad.
-rw-r--r--tests/twisted/caps/compat-bundles.py19
1 files changed, 7 insertions, 12 deletions
diff --git a/tests/twisted/caps/compat-bundles.py b/tests/twisted/caps/compat-bundles.py
index ab9cdb5e2..e7804084e 100644
--- a/tests/twisted/caps/compat-bundles.py
+++ b/tests/twisted/caps/compat-bundles.py
@@ -12,24 +12,19 @@ import dbus
from twisted.words.xish import xpath, domish
from servicetest import EventPattern, assertEquals
-from gabbletest import exec_test
+from gabbletest import exec_test, elem, elem_iq
import constants as cs
import ns
def disco_bundle(q, bus, conn, stream, node, features):
-
- request = """
-<iq from='fake_contact@jabber.org/resource'
- id='disco1'
- to='gabble@jabber.org/resource'
- type='get'>
- <query xmlns='""" + ns.DISCO_INFO + """'
- node='""" + node + """'/>
-</iq>
-"""
+ request = \
+ elem_iq(stream, 'get', from_='fake_contact@jabber.org/resource')(
+ elem(ns.DISCO_INFO, 'query', node=node)
+ )
stream.send(request)
- disco_response = q.expect('stream-iq', query_ns=ns.DISCO_INFO)
+ disco_response = q.expect('stream-iq', query_ns=ns.DISCO_INFO,
+ iq_id=request['id'])
nodes = xpath.queryForNodes('/iq/query/feature', disco_response.stanza)
vars = [n["var"] for n in nodes]
assertEquals(set(features), set(vars))