summaryrefslogtreecommitdiff
path: root/tests/twisted
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2013-10-01 15:38:53 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-10-02 12:34:52 +0100
commit4f4ed243e50fa2ff1f273827ca3f9a578297834f (patch)
tree0d5aa1d56ee29917f4fa8c632a8c7f59a3eb51b6 /tests/twisted
parentd780671e7e2a35f35b2dbc4a28ffdbe98bc97a9a (diff)
McdAccount: go back to using GetKnownAvatarTokens
Sadly, contact attributes aren't enough to distinguish between "this protocol doesn't store avatars and you haven't re-sent your avatar since you last connected", "this protocol stores avatars but the CM hasn't checked for your current avatar yet", and "this protocol stores avatars, but there is no avatar on the server for you". GetKnownAvatarTokens specifically excludes the middle option (blocking on a server round-trip if it needs to), and uses "avatar token missing" for the first and "avatar token empty" for the last. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69885 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Diffstat (limited to 'tests/twisted')
-rw-r--r--tests/twisted/account-manager/avatar-refresh.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/twisted/account-manager/avatar-refresh.py b/tests/twisted/account-manager/avatar-refresh.py
index 03a02b9b..e1c7051f 100644
--- a/tests/twisted/account-manager/avatar-refresh.py
+++ b/tests/twisted/account-manager/avatar-refresh.py
@@ -148,29 +148,6 @@ class Account(object):
# Nobody has an avatar - nothing should happen
self.winner = None
- # Hack around bugs... ideally, the tests would pass without these.
- if server_delays and local_avatar == 'old' and remote_avatar:
- # What we *should* do is wait for GetKnownAvatarTokens
- # (because GetContactAttributes isn't guaranteed to fetch
- # our own up-to-date avatar token from the server), then
- # download the remote avatar. We currently don't.
- self.winner = 'MC'
- elif server_delays and remote_avatar and not local_avatar:
- # What we *should* do is wait for GetKnownAvatarTokens
- # (because GetContactAttributes isn't guaranteed to fetch
- # our own up-to-date avatar token from the server), then
- # download the remote avatar. At the moment we never actually
- # download it at all.
- self.winner = None
- elif avatars_persist and local_avatar == 'old' and not remote_avatar:
- # What we *should* do is work out that the avatar on the
- # server has been deleted since we last signed in,
- # and delete our local avatar to match. (telepathy-spec
- # does provide a way to distinguish between this and
- # "the protocol doesn't store avatars", but it's
- # really subtle; it's hardly surprising if this is wrong.)
- self.winner = 'MC'
-
def test(self, q, bus, mc):
expected_params = {
'account': self.id,