[telepathy-gabble/master] Test the Senders property a bit more

Sjoerd Simons sjoerd.simons at collabora.co.uk
Mon Dec 14 07:18:03 PST 2009


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

diff --git a/tests/twisted/jingle/call-basics.py b/tests/twisted/jingle/call-basics.py
index b643848..bd2fe82 100644
--- a/tests/twisted/jingle/call-basics.py
+++ b/tests/twisted/jingle/call-basics.py
@@ -275,6 +275,33 @@ def run_test(jp, q, bus, conn, stream, incoming):
                     remote_handle: cs.CALL_SENDING_STATE_SENDING },
                   stream_props["Senders"])
 
+    # Turn sending off and on again
+    cstream.SetSending (False,
+        dbus_interface = cs.CALL_STREAM)
+
+    q.expect ('dbus-signal', signal='SendersChanged',
+        interface = cs.CALL_STREAM,
+        args = [{ self_handle: cs.CALL_SENDING_STATE_NONE }, []])
+
+    stream_props = cstream.GetAll (cs.CALL_STREAM,
+        dbus_interface = dbus.PROPERTIES_IFACE)
+    assertEquals ({ self_handle : cs.CALL_SENDING_STATE_NONE,
+                    remote_handle: cs.CALL_SENDING_STATE_SENDING },
+                  stream_props["Senders"])
+
+    cstream.SetSending (True,
+        dbus_interface = cs.CALL_STREAM)
+
+    q.expect ('dbus-signal', signal='SendersChanged',
+        interface = cs.CALL_STREAM,
+        args = [{ self_handle: cs.CALL_SENDING_STATE_SENDING }, []])
+
+    stream_props = cstream.GetAll (cs.CALL_STREAM,
+        dbus_interface = dbus.PROPERTIES_IFACE)
+    assertEquals ({ self_handle : cs.CALL_SENDING_STATE_SENDING,
+                    remote_handle: cs.CALL_SENDING_STATE_SENDING },
+                  stream_props["Senders"])
+
     try:
         path = chan.AddContent ("Webcam", cs.CALL_MEDIA_TYPE_AUDIO,
             dbus_interface=cs.CHANNEL_TYPE_CALL)
-- 
1.5.6.5




More information about the telepathy-commits mailing list