telepathy-gabble: test: protocol.py: make the test pass when plugins add new statuses
Will Thompson
wjt at kemper.freedesktop.org
Mon Nov 5 05:55:35 PST 2012
Module: telepathy-gabble
Branch: master
Commit: 1e5c99563e671ca7dece95a1fa66d5a20cb9c722
URL: http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=1e5c99563e671ca7dece95a1fa66d5a20cb9c722
Author: Alban Crequy <alban.crequy at collabora.co.uk>
Date: Thu Feb 9 15:12:02 2012 +0000
test: protocol.py: make the test pass when plugins add new statuses
https://bugs.freedesktop.org/show_bug.cgi?id=45988
---
tests/twisted/cm/protocol.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tests/twisted/cm/protocol.py b/tests/twisted/cm/protocol.py
index 3320bfb..e9c0b1c 100644
--- a/tests/twisted/cm/protocol.py
+++ b/tests/twisted/cm/protocol.py
@@ -53,7 +53,10 @@ def test(q, bus, conn, stream):
'hidden' : (cs.PRESENCE_HIDDEN, True, True)}
presences = proto_prop_iface.Get(cs.PROTOCOL_IFACE_PRESENCES, 'Statuses');
- assertEquals(expected_status, unwrap(presences))
+ # Plugins could add additional statuses, so we check if expected_status is
+ # included in presences rather than equality.
+ for k, v in expected_status.iteritems():
+ assertEquals(expected_status[k], unwrap(presences[k]))
# (Only) 'account' is mandatory for IdentifyAccount()
call_async(q, proto_iface, 'IdentifyAccount', {})
More information about the telepathy-commits
mailing list