summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDafydd Harries <dafydd.harries@collabora.co.uk>2007-06-15 13:01:13 +0000
committerDafydd Harries <dafydd.harries@collabora.co.uk>2007-06-15 13:01:13 +0000
commit421b0c6734efa917594d1c4d83fcee0883f9bcf9 (patch)
tree6b98508c2ddc3e5d0d847609b25506466fd4f61f
parentf24dc42c61aa2d34391a889149e201e758f976ed (diff)
test-muc.py: use new IQ event attributestelepathy-gabble-0.5.12
-rw-r--r--tests/test-muc.py19
1 files changed, 5 insertions, 14 deletions
diff --git a/tests/test-muc.py b/tests/test-muc.py
index 2e13a3191..2fe647c30 100644
--- a/tests/test-muc.py
+++ b/tests/test-muc.py
@@ -18,23 +18,14 @@ def expect_connected(event, data):
['chat@conf.localhost'])
return True
-@match('stream-iq')
+@match('stream-iq', to='conf.localhost',
+ query_ns='http://jabber.org/protocol/disco#info')
def expect_disco(event, data):
- iq = event.stanza
- nodes = xpath.queryForNodes(
- "/iq/query[@xmlns='http://jabber.org/protocol/disco#info']", iq)
-
- if not nodes:
- return False
-
- assert iq['to'] == 'conf.localhost'
-
- query = nodes[0]
- feature = query.addElement('feature')
+ feature = event.query.addElement('feature')
feature['var'] = 'http://jabber.org/protocol/muc'
- iq['type'] = 'result'
- data['stream'].send(iq)
+ event.stanza['type'] = 'result'
+ data['stream'].send(event.stanza)
return True
def expect_request_handles_return(event, data):