telepathy-mission-control: Add a regression test for a "no SimplePresence" special case
Simon McVittie
smcv at kemper.freedesktop.org
Wed Sep 4 05:38:36 PDT 2013
Module: telepathy-mission-control
Branch: master
Commit: 2f3f113042ad117f35e2ebb2a26556b2c550e8af
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=2f3f113042ad117f35e2ebb2a26556b2c550e8af
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Wed Aug 28 15:36:14 2013 +0100
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 at collabora.co.uk>
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
---
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 36bd283..6575aed 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'])
More information about the telepathy-commits
mailing list