diff options
author | Alban Crequy <alban.crequy@collabora.co.uk> | 2012-02-09 15:12:02 +0000 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2012-11-05 13:54:39 +0000 |
commit | 1e5c99563e671ca7dece95a1fa66d5a20cb9c722 (patch) | |
tree | 07b22fef7154a3a976045c54f2673b7a2745ea5a | |
parent | 683414706b5f83f193143e4765cd1437698d8fd3 (diff) |
test: protocol.py: make the test pass when plugins add new statuses
https://bugs.freedesktop.org/show_bug.cgi?id=45988
-rw-r--r-- | 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 3320bfb22..e9c0b1c3b 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', {}) |