summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-04-16 16:21:39 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-04-16 16:54:01 +0200
commit3ebb7822b9fb9692b9ddb807b9f2e17cfbac5a01 (patch)
tree84d2156aac0062b5a42c461f222de6b3e1c377c7
parenta02a0deb23cd62d472114ab71d4b0b6aee8b736c (diff)
test that GetContactAttributes returns an empty location if there is no location
-rw-r--r--tests/twisted/test-location.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/twisted/test-location.py b/tests/twisted/test-location.py
index 20d67216e..93211b943 100644
--- a/tests/twisted/test-location.py
+++ b/tests/twisted/test-location.py
@@ -178,11 +178,17 @@ def test(q, bus, conn, stream):
assertLength(1, locations)
assertEquals(locations[bob_handle], location)
+ charles_handle = conn.RequestHandles(cs.HT_CONTACT, ['charles@foo.com'])[0]
+
# check that Contacts interface supports location
- assert conn.Contacts.GetContactAttributes([bob_handle],
- [cs.CONN_IFACE_LOCATION], False) == { bob_handle:
- { cs.CONN_IFACE_LOCATION + '/location': location,
- 'org.freedesktop.Telepathy.Connection/contact-id': 'bob@foo.com'}}
+ assert conn.Contacts.GetContactAttributes([bob_handle, charles_handle],
+ [cs.CONN_IFACE_LOCATION], False) == {
+ bob_handle:
+ { cs.CONN_IFACE_LOCATION + '/location': location,
+ 'org.freedesktop.Telepathy.Connection/contact-id': 'bob@foo.com'},
+ charles_handle:
+ { cs.CONN_IFACE_LOCATION + '/location': {},
+ 'org.freedesktop.Telepathy.Connection/contact-id': 'charles@foo.com'}}
# Try to set our location by passing a valid with an invalid type (lat is
# supposed to be a double)