diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-08-28 15:36:14 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-09-04 13:29:15 +0100 |
commit | 2f3f113042ad117f35e2ebb2a26556b2c550e8af (patch) | |
tree | a0c92894e9b4e7b063fe63931e22f8255a456ef6 | |
parent | 6e88e909f5f1cb4b0f0d33f88b26f5cb6d3fc9c7 (diff) | |
download | telepathy-mission-control-2f3f113042ad117f35e2ebb2a26556b2c550e8af.tar.gz |
Add a regression test for a "no SimplePresence" special case
CurrentPresence should toggle between OFFLINE and UNSET if the account
has no concept of presence.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68905
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
-rw-r--r-- | tests/twisted/account-manager/irc.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/twisted/account-manager/irc.py b/tests/twisted/account-manager/irc.py index 36bd2838..6575aed6 100644 --- a/tests/twisted/account-manager/irc.py +++ b/tests/twisted/account-manager/irc.py @@ -1,7 +1,10 @@ # encoding: utf-8 # +# Test the odd things about IRC: it has no presence, and nicknames +# are the same thing as identifiers. +# # Copyright © 2009 Nokia Corporation -# Copyright © 2009-2012 Collabora Ltd. +# Copyright © 2009-2013 Collabora Ltd. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -53,9 +56,14 @@ def test(q, bus, mc): EventPattern('dbus-method-call', interface=cs.CONN_IFACE_ALIASING, method='SetAliases', handled=False), + EventPattern('dbus-signal', + interface=cs.ACCOUNT, + predicate=lambda e: + e.args[0].get('CurrentPresence') == + (cs.PRESENCE_TYPE_UNSET, '', '')), ] - conn, get_aliases, set_aliases = enable_fakecm_account(q, bus, mc, + conn, get_aliases, set_aliases, _ = enable_fakecm_account(q, bus, mc, account, params, has_aliasing=True, expect_after_connect=expect_after_connect, self_ident=params['account']) |