[telepathy-gabble/master] caps/advertise-draft2.py: regression test for the previous patch

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Sep 8 04:32:55 PDT 2009


Suggested by albanc's review.
---
 tests/twisted/caps/advertise-draft2.py |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/caps/advertise-draft2.py b/tests/twisted/caps/advertise-draft2.py
index 16ecd55..822d050 100644
--- a/tests/twisted/caps/advertise-draft2.py
+++ b/tests/twisted/caps/advertise-draft2.py
@@ -106,6 +106,34 @@ def run_test(q, bus, conn, stream):
             False)
     check_caps(namespaces, [])
 
+    # If AbiWord claims that it can do MediaSignalling things on its Tubes
+    # channels, then it's wrong, and that still doesn't make us callable.
+    conn.ContactCapabilities.UpdateCapabilities([
+        (cs.CLIENT + '.AbiWord', [
+        { cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_STREAM_TUBE,
+            cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT,
+            cs.STREAM_TUBE_SERVICE: 'x-abiword' },
+        { cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_STREAM_TUBE,
+            cs.TARGET_HANDLE_TYPE: cs.HT_ROOM,
+            cs.STREAM_TUBE_SERVICE: 'x-abiword' },
+        ], [
+            cs.CHANNEL_IFACE_MEDIA_SIGNALLING + '/gtalk-p2p',
+            cs.CHANNEL_IFACE_MEDIA_SIGNALLING + '/ice-udp',
+            cs.CHANNEL_IFACE_MEDIA_SIGNALLING + '/video/h264',
+            ]),
+        ])
+    (disco_response, namespaces, _) = receive_presence_and_ask_caps(q, stream,
+            False)
+    check_caps(namespaces, [ns.TUBES + '/stream#x-abiword'])
+
+    # Remove the broken version of AbiWord's caps
+    conn.ContactCapabilities.UpdateCapabilities([
+        (cs.CLIENT + '.AbiWord', [], []),
+        ])
+    (disco_response, namespaces, _) = receive_presence_and_ask_caps(q, stream,
+            False)
+    check_caps(namespaces, [])
+
     # Add caps selectively. Here we're callable, but not via ICE-UDP, and not
     # with video.
     #
-- 
1.5.6.5




More information about the telepathy-commits mailing list