[Telepathy-commits] [telepathy-gabble/master] test-text: exercise Channel properties in IM channels

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Aug 19 10:53:09 PDT 2008


20080606130047-53eee-1fc1af6ac03989529903fb9d3264b0a7902d9bdc.gz
---
 tests/twisted/text/test-text.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/text/test-text.py b/tests/twisted/text/test-text.py
index 3044ff6..9c35b55 100644
--- a/tests/twisted/text/test-text.py
+++ b/tests/twisted/text/test-text.py
@@ -28,6 +28,21 @@ def test(q, bus, conn, stream):
     jid = conn.InspectHandles(1, [event.args[3]])[0]
     assert jid == 'foo at bar.com'
 
+    # Exercise basic Channel Properties from spec 0.17.7
+    channel_props = text_chan.GetAll(
+            'org.freedesktop.Telepathy.Channel',
+            dbus_interface='org.freedesktop.DBus.Properties')
+    assert channel_props.get('TargetHandle') == event.args[3],\
+            (channel_props.get('TargetHandle'), event.args[3])
+    assert channel_props.get('TargetHandleType') == 1,\
+            channel_props.get('TargetHandleType')
+    assert channel_props.get('ChannelType') == \
+            'org.freedesktop.Telepathy.Channel.Type.Text',\
+            channel_props.get('ChannelType')
+    assert 'org.freedesktop.Telepathy.Channel.Interface.ChatState' in \
+            channel_props.get('Interfaces', ()), \
+            channel_props.get('Interfaces')
+
     event = q.expect('dbus-signal', signal='Received')
 
     # message type: normal
-- 
1.5.6.3




More information about the Telepathy-commits mailing list