[telepathy-gabble/master] Test the requestable channel classes contain the new media spec

Sjoerd Simons sjoerd.simons at collabora.co.uk
Tue Dec 29 05:34:39 PST 2009


---
 tests/twisted/jingle/outgoing-basics.py |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/jingle/outgoing-basics.py b/tests/twisted/jingle/outgoing-basics.py
index 9343549..edb7f4b 100644
--- a/tests/twisted/jingle/outgoing-basics.py
+++ b/tests/twisted/jingle/outgoing-basics.py
@@ -269,6 +269,7 @@ def rccs(q, bus, conn, stream):
     rccs = conn.Properties.Get(cs.CONN_IFACE_REQUESTS,
         'RequestableChannelClasses')
 
+    # Test Channel.Type.Call.StreamedMedia
     media_classes = [ rcc for rcc in rccs
         if rcc[0][cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_STREAMED_MEDIA ]
 
@@ -284,6 +285,21 @@ def rccs(q, bus, conn, stream):
     assertContains (cs.INITIAL_VIDEO, allowed)
     assertContains (cs.INITIAL_AUDIO, allowed)
 
+    # Test Channel.Type.Call
+    media_classes = [ rcc for rcc in rccs
+        if rcc[0][cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_CALL ]
+    assertLength(1, media_classes)
+
+    fixed, allowed = media_classes[0]
+
+    assertEquals(cs.HT_CONTACT, fixed[cs.TARGET_HANDLE_TYPE])
+
+    assertContains(cs.TARGET_HANDLE, allowed)
+    assertContains(cs.TARGET_ID, allowed)
+
+    assertContains (cs.CALL_INITIAL_VIDEO, allowed)
+    assertContains (cs.CALL_INITIAL_AUDIO, allowed)
+
 if __name__ == '__main__':
     exec_test(rccs)
     test_all_dialects(request_anonymous)
-- 
1.5.6.5




More information about the telepathy-commits mailing list