[telepathy-gabble/master] Add checks for an endpoint's StreamState and StreamStateChanged.

Mike Ruprecht mike.ruprecht at collabora.co.uk
Tue Dec 29 05:35:05 PST 2009


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

diff --git a/tests/twisted/jingle/call-basics.py b/tests/twisted/jingle/call-basics.py
index 8cda677..74a61c3 100644
--- a/tests/twisted/jingle/call-basics.py
+++ b/tests/twisted/jingle/call-basics.py
@@ -160,10 +160,21 @@ def run_test(jp, q, bus, conn, stream, incoming):
 
     assertEquals ([], candidates)
 
+    state = endpoint.Get (cs.CALL_STREAM_ENDPOINT,
+        "StreamState",  dbus_interface=dbus.PROPERTIES_IFACE)
+    assertEquals (cs.MEDIA_STREAM_STATE_DISCONNECTED, state)
+
     if incoming:
         endpoint.SetStreamState (cs.MEDIA_STREAM_STATE_CONNECTED,
             dbus_interface=cs.CALL_STREAM_ENDPOINT)
 
+        q.expect('dbus-signal', signal='StreamStateChanged',
+            interface=cs.CALL_STREAM_ENDPOINT)
+
+        state = endpoint.Get (cs.CALL_STREAM_ENDPOINT,
+            "StreamState",  dbus_interface=dbus.PROPERTIES_IFACE)
+        assertEquals (cs.MEDIA_STREAM_STATE_CONNECTED, state)
+
         chan.Accept (dbus_interface=cs.CHANNEL_TYPE_CALL)
         q.expect('stream-iq', predicate=jp.action_predicate('session-accept'))
     else:
-- 
1.5.6.5




More information about the telepathy-commits mailing list