[telepathy-gabble/master] Test the implementation of the Transport property
Sjoerd Simons
sjoerd.simons at collabora.co.uk
Tue Dec 29 05:34:45 PST 2009
---
tests/twisted/constants.py | 4 ++++
tests/twisted/jingle/call-outgoing-basics.py | 6 ++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py
index 24e21c8..e6f0816 100644
--- a/tests/twisted/constants.py
+++ b/tests/twisted/constants.py
@@ -71,6 +71,10 @@ CALL_STREAM_ENDPOINT = 'org.freedesktop.Telepathy.Call.Stream.Endpoint.Draft'
CALL_MEDIA_TYPE_AUDIO = 1
CALL_MEDIA_TYPE_VIDEO = 2
+CALL_STREAM_TRANSPORT_RAW_UDP = 0
+CALL_STREAM_TRANSPORT_ICE = 1
+CALL_STREAM_TRANSPORT_GOOGLE = 2
+
CONN = "org.freedesktop.Telepathy.Connection"
CONN_IFACE_AVATARS = CONN + '.Interface.Avatars'
diff --git a/tests/twisted/jingle/call-outgoing-basics.py b/tests/twisted/jingle/call-outgoing-basics.py
index ec344f7..47b6787 100644
--- a/tests/twisted/jingle/call-outgoing-basics.py
+++ b/tests/twisted/jingle/call-outgoing-basics.py
@@ -96,6 +96,12 @@ def run_test(jp, q, bus, conn, stream):
"Endpoints", dbus_interface=dbus.PROPERTIES_IFACE)
assertEquals (1, len (endpoints))
+ # There doesn't seem to be a good way to get the transport type from the
+ # JP used, for now assume we prefer gtalk p2p and always pick that..
+ transport = cstream.Get(cs.CALL_STREAM_IFACE_MEDIA,
+ "Transport", dbus_interface=dbus.PROPERTIES_IFACE)
+ assertEquals (cs.CALL_STREAM_TRANSPORT_GOOGLE, transport)
+
endpoint = bus.get_object (conn.bus_name, endpoints[0])
candidates = endpoint.Get (cs.CALL_STREAM_ENDPOINT,
"RemoteCandidates", dbus_interface=dbus.PROPERTIES_IFACE)
--
1.5.6.5
More information about the telepathy-commits
mailing list