telepathy-rakia: Factor out the requestable channel classes test

Olivier Crête tester at kemper.freedesktop.org
Tue May 8 10:02:59 PDT 2012


Module: telepathy-rakia
Branch: master
Commit: 682e06632120f35de16728226b87a3193ea31f33
URL:    http://cgit.freedesktop.org/telepathy/telepathy-rakia/commit/?id=682e06632120f35de16728226b87a3193ea31f33

Author: Olivier Crête <olivier.crete at collabora.com>
Date:   Fri Feb 10 15:08:51 2012 +0100

Factor out the requestable channel classes test

---

 tests/twisted/Makefile.am             |    1 +
 tests/twisted/voip/outgoing-basics.py |   41 ---------------------------------
 2 files changed, 1 insertions(+), 41 deletions(-)

diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index 816c77d..74cb3b9 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -12,6 +12,7 @@ TWISTED_TESTS = \
 	text/initiate-requestotron.py \
 	voip/incoming-basics.py \
 	voip/outgoing-basics.py \
+	voip/requestable-classes.py \
 	$(NULL)
 
 TESTS =
diff --git a/tests/twisted/voip/outgoing-basics.py b/tests/twisted/voip/outgoing-basics.py
index 8d4a161..7679447 100644
--- a/tests/twisted/voip/outgoing-basics.py
+++ b/tests/twisted/voip/outgoing-basics.py
@@ -240,50 +240,9 @@ def worker(q, bus, conn, sip_proxy, variant, peer):
 
     chan.Close()
 
-def rccs(q, bus, conn, stream):
-    """
-    Tests that the connection's RequestableChannelClasses for StreamedMedia are
-    sane.
-    """
-    conn.Connect()
-
-
-    a = q.expect('dbus-signal', signal='StatusChanged',
-                 args=[cs.CONN_STATUS_CONNECTING, cs.CSR_REQUESTED])
-
-    a = q.expect('dbus-signal', signal='StatusChanged',
-                 args=[cs.CONN_STATUS_CONNECTED, cs.CSR_REQUESTED])
-
-    rccs = conn.Properties.Get(cs.CONN_IFACE_REQUESTS,
-        'RequestableChannelClasses')
-
-    # Test Channel.Type.StreamedMedia
-    media_classes = [ rcc for rcc in rccs
-        if rcc[0][cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_CALL ]
-
-    assertLength(2, media_classes)
-
-    for media_class in media_classes:
-        fixed, allowed = media_class
-
-        assertEquals(cs.HT_CONTACT, fixed[cs.TARGET_HANDLE_TYPE])
-        assert fixed.has_key(cs.INITIAL_AUDIO) or fixed.has_key(cs.INITIAL_VIDEO)
-
-        expected_allowed = [
-            cs.TARGET_ID, cs.TARGET_HANDLE,
-            cs.INITIAL_VIDEO, cs.INITIAL_AUDIO,
-            cs.INITIAL_VIDEO_NAME, cs.INITIAL_AUDIO_NAME,
-            cs.INITIAL_TRANSPORT,
-            cs.DTMF_INITIAL_TONES,
-            ]
-
-        allowed.sort()
-        expected_allowed.sort()
-        assertSameSets(expected_allowed, allowed)
 
 if __name__ == '__main__':
     
-    exec_test(rccs)
     exec_test(create)
     exec_test(lambda q, b, c, s:
             create(q, b, c, s, peer='foo at gw.bar.com'))



More information about the telepathy-commits mailing list