[telepathy-gabble/master] test-location.py: test to set an unknown key in the Location dict and XMPP reply
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Thu Aug 6 10:17:15 PDT 2009
---
tests/twisted/test-location.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/tests/twisted/test-location.py b/tests/twisted/test-location.py
index 8ede9da..5b1fa4d 100644
--- a/tests/twisted/test-location.py
+++ b/tests/twisted/test-location.py
@@ -99,7 +99,9 @@ def test(q, bus, conn, stream):
conn.Location.SetLocation({
'lat': dbus.Double(0.0, variant_level=1),
'lon': 0.0,
- 'language': 'en'})
+ 'language': 'en',
+ # Gabble silently ignores unknown keys
+ 'badger': 'mushroom'})
geoloc_iq_set_event = EventPattern('stream-iq', predicate=lambda x:
xpath.queryForNodes("/iq/pubsub/publish/item/geoloc", x.stanza))
@@ -134,6 +136,8 @@ def test(q, bus, conn, stream):
geoloc['xml:lang'] = 'en'
geoloc.addElement('lat', content='1.234')
geoloc.addElement('lon', content='5.678')
+ # invalid element, will be discarded by Gabble
+ geoloc.addElement('badger', content='mushroom')
stream.send(result)
update_event = q.expect('dbus-signal', signal='LocationUpdated')
--
1.5.6.5
More information about the telepathy-commits
mailing list