[Telepathy-commits] [telepathy-gabble/master] gadget-invite.py: use more ns.ps namespace
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Mon Oct 20 05:17:30 PDT 2008
---
tests/twisted/olpc/gadget-invite.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/twisted/olpc/gadget-invite.py b/tests/twisted/olpc/gadget-invite.py
index 262398e..dc4ba9b 100644
--- a/tests/twisted/olpc/gadget-invite.py
+++ b/tests/twisted/olpc/gadget-invite.py
@@ -20,7 +20,7 @@ def join_channel(name, q, conn, stream):
event = q.expect('stream-iq', to='conference.localhost', query_ns=ns.DISCO_INFO)
reply = make_result_iq(stream, event.stanza)
feature = reply.firstChildElement().addElement('feature')
- feature['var'] = 'http://jabber.org/protocol/muc'
+ feature['var'] = ns.MUC
stream.send(reply)
event = q.expect('dbus-return', method='RequestHandles')
@@ -33,7 +33,7 @@ def join_channel(name, q, conn, stream):
# Send presence for own membership of room.
presence = domish.Element((None, 'presence'))
presence['from'] = 'myroom at conference.localhost/test'
- x = presence.addElement(('http://jabber.org/protocol/muc#user', 'x'))
+ x = presence.addElement((ns.MUC_USER, 'x'))
item = x.addElement('item')
item['affiliation'] = 'none'
item['role'] = 'participant'
@@ -81,7 +81,7 @@ def test(q, bus, conn, stream):
message = event.stanza
properties = xpath.queryForNodes('/message/properties', message)
assert (properties is not None and len(properties) == 1), repr(properties)
- assert properties[0].uri == 'http://laptop.org/xmpp/activity-properties'
+ assert properties[0].uri == ns.OLPC_ACTIVITY_PROPS
assert properties[0]['room'] == 'myroom at conference.localhost'
assert properties[0]['activity'] == 'roomid'
@@ -90,7 +90,7 @@ def test(q, bus, conn, stream):
message = event.stanza
x = xpath.queryForNodes('/message/x', message)
assert (x is not None and len(x) == 1), repr(x)
- assert x[0].uri == 'http://jabber.org/protocol/muc#user'
+ assert x[0].uri == ns.MUC_USER
invites = xpath.queryForNodes('/x/invite', x[0])
assert (invites is not None and len(invites) == 1), repr(invites)
@@ -109,7 +109,7 @@ def test(q, bus, conn, stream):
# Gadget joins the room
presence = domish.Element((None, 'presence'))
presence['from'] = 'myroom at conference.localhost/inspector'
- x = presence.addElement(('http://jabber.org/protocol/muc#user', 'x'))
+ x = presence.addElement((ns.MUC_USER, 'x'))
item = x.addElement('item')
item['jid'] = 'gadget.localhost'
item['affiliation'] = 'none'
--
1.5.6.5
More information about the Telepathy-commits
mailing list