summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2012-03-01 18:44:03 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2012-03-01 19:23:30 -0500
commitfb20a3fed62ba2ea18b07a542c29086710691583 (patch)
tree51641e595eb2381bf803efe685050a8ad244942d /tests
parentd90b713b5198cb6e0bb3e4c79b99198dec122806 (diff)
Call: Set the streams to sending when the remote side accepts
Also add some tests
Diffstat (limited to 'tests')
-rw-r--r--tests/twisted/voip/calltest.py25
1 files changed, 22 insertions, 3 deletions
diff --git a/tests/twisted/voip/calltest.py b/tests/twisted/voip/calltest.py
index 08b80e2..490faee 100644
--- a/tests/twisted/voip/calltest.py
+++ b/tests/twisted/voip/calltest.py
@@ -3,7 +3,7 @@ import dbus
from sofiatest import exec_test
from servicetest import (
- make_channel_proxy, wrap_channel,
+ make_channel_proxy, wrap_channel, sync_dbus,
EventPattern, call_async, ProxyWrapper,
assertEquals, assertNotEquals, assertContains, assertLength,
)
@@ -422,9 +422,27 @@ class CallTest:
def accept(self):
if self.incoming:
- return self.accept_incoming()
+ self.accept_incoming()
else:
- return self.accept_outgoing()
+ self.accept_outgoing()
+
+ def running_check(self):
+ self.context.options_ping(self.q)
+ sync_dbus(self.bus, self.q, self.conn)
+
+ for c in self.contents:
+ props = c.stream.Properties.GetAll(cs.CALL_STREAM)
+ assertEquals(cs.CALL_SENDING_STATE_SENDING,
+ props['LocalSendingState'])
+ assertEquals({self.remote_handle: cs.CALL_SENDING_STATE_SENDING},
+ props['RemoteMembers'])
+
+ props = c.stream.Properties.GetAll(cs.CALL_STREAM_IFACE_MEDIA)
+ assertEquals(cs.CALL_STREAM_FLOW_STATE_STARTED,
+ props['SendingState'])
+ assertEquals(cs.CALL_STREAM_FLOW_STATE_STARTED,
+ props['ReceivingState'])
+
def hangup(self):
if self.incoming:
@@ -462,6 +480,7 @@ class CallTest:
self.connect()
self.initiate()
self.accept()
+ self.running_check()
self.during_call()
self.hangup()
self.chan.Close()