[telepathy-gabble/master] Test GetCCs for handles with unknown presence
Will Thompson
will.thompson at collabora.co.uk
Wed Sep 30 05:54:23 PDT 2009
---
tests/twisted/caps/tube-caps.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/tests/twisted/caps/tube-caps.py b/tests/twisted/caps/tube-caps.py
index d5dfbf4..41913a1 100644
--- a/tests/twisted/caps/tube-caps.py
+++ b/tests/twisted/caps/tube-caps.py
@@ -130,6 +130,14 @@ def receive_caps(q, conn, stream, contact, contact_handle, features,
def test_tube_caps_from_contact(q, bus, conn, stream, contact):
contact_handle = conn.RequestHandles(cs.HT_CONTACT, [contact])[0]
+ # Check that we don't crash if we haven't seen any caps/presence for this
+ # contact yet.
+ caps = conn.ContactCapabilities.GetContactCapabilities([contact_handle])
+
+ # Since we don't know their caps, they should be omitted from the dict,
+ # rather than present with no caps.
+ assertEquals({}, caps)
+
# send presence with no tube cap
basic_caps = dbus.Dictionary({contact_handle:
[(text_fixed_properties, text_allowed_properties)]})
--
1.5.6.5
More information about the telepathy-commits
mailing list