summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-10-09 17:55:24 -0400
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-10-11 17:55:06 -0400
commitb7a7228c31557728d5133c23e380fcbc569a31e8 (patch)
tree1f57c71879433892ed4823005b1370d9d65f1f62
parenta53df2b59b47fbb28c8599df083c65b8ba3cef62 (diff)
stop using GetAvatarTokens()
-rw-r--r--tests/twisted/vcard/test-avatar-tokens.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/twisted/vcard/test-avatar-tokens.py b/tests/twisted/vcard/test-avatar-tokens.py
index 705fe386b..281a733bc 100644
--- a/tests/twisted/vcard/test-avatar-tokens.py
+++ b/tests/twisted/vcard/test-avatar-tokens.py
@@ -5,7 +5,7 @@ Test GetAvatarTokens() and GetKnownAvatarTokens().
from twisted.words.xish import domish
-from servicetest import unwrap, EventPattern
+from servicetest import unwrap, assertEquals
from gabbletest import exec_test, make_result_iq
import ns
import constants as cs
@@ -44,8 +44,11 @@ def test(q, bus, conn, stream):
handles = conn.get_contact_handles_sync([
'amy@foo.com', 'bob@foo.com', 'che@foo.com', 'daf@foo.com' ])
- tokens = unwrap(conn.Avatars.GetAvatarTokens(handles))
- assert tokens == ['SHA1SUM-FOR-AMY', 'SHA1SUM-FOR-BOB', '', '']
+ h2asv = conn.Contacts.GetContactAttributes(handles, [cs.CONN_IFACE_AVATARS], False)
+ assertEquals('SHA1SUM-FOR-AMY', h2asv[handles[0]][cs.ATTR_AVATAR_TOKEN])
+ assertEquals('SHA1SUM-FOR-BOB', h2asv[handles[1]][cs.ATTR_AVATAR_TOKEN])
+ assertEquals('', h2asv[handles[2]][cs.ATTR_AVATAR_TOKEN])
+ assertEquals(None, h2asv[handles[3]].get(cs.ATTR_AVATAR_TOKEN))
tokens = unwrap(conn.Avatars.GetKnownAvatarTokens(handles))
tokens = sorted(tokens.items())