[Telepathy-commits] [telepathy-gabble/master] check_conn_properties: all missing tube(s) channel type

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Wed Feb 11 03:55:46 PST 2009


---
 tests/twisted/tubes/tubetestutil.py |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/tubes/tubetestutil.py b/tests/twisted/tubes/tubetestutil.py
index f3c38f6..a5e27c2 100644
--- a/tests/twisted/tubes/tubetestutil.py
+++ b/tests/twisted/tubes/tubetestutil.py
@@ -62,6 +62,7 @@ def check_conn_properties(q, conn, channel_list=None):
             assert i in properties['Channels'], \
                 (i, properties['Channels'])
 
+    # 1-1 tubes channel (old API)
     assert ({CHANNEL_TYPE: CHANNEL_TYPE_TUBES,
              TARGET_HANDLE_TYPE: HT_CONTACT,
              },
@@ -69,6 +70,17 @@ def check_conn_properties(q, conn, channel_list=None):
              ]
             ) in properties.get('RequestableChannelClasses'),\
                      properties['RequestableChannelClasses']
+
+    # muc tubes channel (old API)
+    assert ({CHANNEL_TYPE: CHANNEL_TYPE_TUBES,
+             TARGET_HANDLE_TYPE: HT_ROOM,
+             },
+             [TARGET_HANDLE, TARGET_ID
+             ]
+            ) in properties.get('RequestableChannelClasses'),\
+                     properties['RequestableChannelClasses']
+
+    # 1-1 StreamTube channel
     assert ({CHANNEL_TYPE: CHANNEL_TYPE_STREAM_TUBE,
              TARGET_HANDLE_TYPE: HT_CONTACT
              },
@@ -76,6 +88,28 @@ def check_conn_properties(q, conn, channel_list=None):
             ) in properties.get('RequestableChannelClasses'),\
                      properties['RequestableChannelClasses']
 
+    # muc StreamTube channel
+    assert ({CHANNEL_TYPE: CHANNEL_TYPE_STREAM_TUBE,
+             TARGET_HANDLE_TYPE: HT_ROOM
+             },
+             [TARGET_HANDLE, TARGET_ID, STREAM_TUBE_SERVICE]
+            ) in properties.get('RequestableChannelClasses'),\
+                     properties['RequestableChannelClasses']
+
+    # 1-1 D-Bus tube channel
+    assert ({CHANNEL_TYPE: CHANNEL_TYPE_DBUS_TUBE,
+            TARGET_HANDLE_TYPE: HT_CONTACT},
+             [TARGET_HANDLE, TARGET_ID, DBUS_TUBE_SERVICE_NAME]
+            ) in properties.get('RequestableChannelClasses'),\
+                     properties['RequestableChannelClasses']
+
+    # muc D-Bus tube channel
+    assert ({CHANNEL_TYPE: CHANNEL_TYPE_DBUS_TUBE,
+            TARGET_HANDLE_TYPE: HT_ROOM},
+             [TARGET_HANDLE, TARGET_ID, DBUS_TUBE_SERVICE_NAME]
+            ) in properties.get('RequestableChannelClasses'),\
+                     properties['RequestableChannelClasses']
+
 class Echo(Protocol):
     """
     A trivial protocol that just echoes back whatever you send it, in lowercase.
-- 
1.5.6.5




More information about the telepathy-commits mailing list