[telepathy-gabble/master] test-location.py: use ns.py
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Thu Aug 6 07:46:45 PDT 2009
---
tests/twisted/ns.py | 1 +
tests/twisted/test-location.py | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/twisted/ns.py b/tests/twisted/ns.py
index e2bb6f3..8679787 100644
--- a/tests/twisted/ns.py
+++ b/tests/twisted/ns.py
@@ -6,6 +6,7 @@ DISCO_INFO = "http://jabber.org/protocol/disco#info"
DISCO_ITEMS = "http://jabber.org/protocol/disco#items"
FEATURE_NEG = 'http://jabber.org/protocol/feature-neg'
FILE_TRANSFER = 'http://jabber.org/protocol/si/profile/file-transfer'
+GEOLOC = 'http://jabber.org/protocol/geoloc'
GOOGLE_FEAT_SESSION = 'http://www.google.com/xmpp/protocol/session'
GOOGLE_FEAT_VOICE = 'http://www.google.com/xmpp/protocol/voice/v1'
GOOGLE_FEAT_VIDEO = 'http://www.google.com/xmpp/protocol/video/v1'
diff --git a/tests/twisted/test-location.py b/tests/twisted/test-location.py
index 38d3b0d..2697a4e 100644
--- a/tests/twisted/test-location.py
+++ b/tests/twisted/test-location.py
@@ -20,7 +20,7 @@ def test(q, bus, conn, stream):
# discard activities request and status change
q.expect_many(
EventPattern('stream-iq', iq_type='set',
- query_ns='http://jabber.org/protocol/pubsub'),
+ query_ns=ns.PUBSUB),
EventPattern('dbus-signal', signal='StatusChanged',
args=[cs.CONN_STATUS_CONNECTED, cs.CSR_REQUESTED]),
)
@@ -114,11 +114,11 @@ def test(q, bus, conn, stream):
call_async(q, conn.Location, 'GetLocations', [handle])
event = q.expect('stream-iq', iq_type='get',
- query_ns='http://jabber.org/protocol/pubsub')
+ query_ns=ns.PUBSUB)
result = make_result_iq(stream, event.stanza)
result['from'] = 'bob at foo.com'
query = result.firstChildElement()
- geoloc = query.addElement(('http://jabber.org/protocol/geoloc', 'geoloc'))
+ geoloc = query.addElement((ns.GEOLOC, 'geoloc'))
geoloc.addElement('lat', content='1.234')
geoloc.addElement('lon', content='5.678')
stream.send(result)
--
1.5.6.5
More information about the telepathy-commits
mailing list