From 3ebb7822b9fb9692b9ddb807b9f2e17cfbac5a01 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 16 Apr 2010 16:21:39 +0200 Subject: test that GetContactAttributes returns an empty location if there is no location --- tests/twisted/test-location.py | 14 ++++++++++---- 1 file 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) -- cgit v1.2.3