summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2012-09-11 11:45:16 +0200
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-09-11 11:20:39 +0100
commit1866bc54eecf2fa6ce00b37d196cd904f8a0203b (patch)
treeca29e990ac5afb9ff35a49b51bd07c7d8c66a3ec
parent61cb4d227d1cbbf85d08f94c28036ba9d831f2fb (diff)
Pass RemoteContact key into UpdateLocalMediaDescription
Now that telepathy-glib actually correctly checks what is passed to UpdateLocalMediaDescription ensure we always pass the RemoteContact key in the dictionary.
-rw-r--r--tests/twisted/jingle/call-codecoffer.py2
-rw-r--r--tests/twisted/jingle/call_helper.py10
-rw-r--r--tests/twisted/jingle/jingletest2.py14
3 files changed, 16 insertions, 10 deletions
diff --git a/tests/twisted/jingle/call-codecoffer.py b/tests/twisted/jingle/call-codecoffer.py
index 90848fe35..0ccf94122 100644
--- a/tests/twisted/jingle/call-codecoffer.py
+++ b/tests/twisted/jingle/call-codecoffer.py
@@ -189,7 +189,7 @@ def test_outgoing(jp, q, bus, conn, stream):
assertEquals(ret[1].args[1][cs.CALL_CONTENT_MEDIADESCRIPTION + ".Codecs"], [])
# get a list of audio codecs we can support
- md = jt2.get_call_audio_md_dbus()
+ md = jt2.get_call_audio_md_dbus(remote_handle)
# make sure UpdateCodecs fails
props = chan.GetAll(cs.CHANNEL_TYPE_CALL,
diff --git a/tests/twisted/jingle/call_helper.py b/tests/twisted/jingle/call_helper.py
index 2bed8cce8..402f1c931 100644
--- a/tests/twisted/jingle/call_helper.py
+++ b/tests/twisted/jingle/call_helper.py
@@ -619,13 +619,13 @@ class CallTest(object):
# Setup media description
contents.append(self.audio_content)
streams.append(self.audio_stream)
- mds.append(self.jt2.get_call_audio_md_dbus())
+ mds.append(self.jt2.get_call_audio_md_dbus(self.peer_handle))
if self.initial_video:
contents.append(self.video_content)
streams.append(self.video_stream)
- mds.append(self.jt2.get_call_video_md_dbus())
-
+ mds.append(self.jt2.get_call_video_md_dbus(self.peer_handle))
+
self.connect_streams(contents, streams, mds,
expect_after_si=expect_after_si)
@@ -728,11 +728,11 @@ class CallTest(object):
ret[1].args[0])
if self.initial_audio:
- md = self.jt2.get_call_audio_md_dbus()
+ md = self.jt2.get_call_audio_md_dbus(self.peer_handle)
self.check_and_accept_offer(self.audio_content, md,
md_changed = False)
if self.initial_video:
- md = self.jt2.get_call_video_md_dbus()
+ md = self.jt2.get_call_video_md_dbus(self.peer_handle)
self.check_and_accept_offer(self.video_content, md,
md_changed = False)
diff --git a/tests/twisted/jingle/jingletest2.py b/tests/twisted/jingle/jingletest2.py
index a3fb73bf3..5ca91d428 100644
--- a/tests/twisted/jingle/jingletest2.py
+++ b/tests/twisted/jingle/jingletest2.py
@@ -820,15 +820,21 @@ class JingleTest2:
def __get_call_video_codecs_dbus(self):
return self.dbusify_call_codecs(self.video_codecs)
- def get_call_audio_md_dbus(self):
- return dbus.Dictionary(
+ def get_call_audio_md_dbus(self, handle = 0):
+ d = dbus.Dictionary(
{ cs.CALL_CONTENT_MEDIADESCRIPTION + '.Codecs': self.__get_call_audio_codecs_dbus(),
}, signature='sv')
+ if handle != 0:
+ d[cs.CALL_CONTENT_MEDIADESCRIPTION + '.RemoteContact'] = dbus.UInt32 (handle)
+ return d
- def get_call_video_md_dbus(self):
- return dbus.Dictionary(
+ def get_call_video_md_dbus(self, handle = 0):
+ d = dbus.Dictionary(
{ cs.CALL_CONTENT_MEDIADESCRIPTION + '.Codecs': self.__get_call_video_codecs_dbus(),
}, signature='sv')
+ if handle != 0:
+ d[cs.CALL_CONTENT_MEDIADESCRIPTION + '.RemoteContact'] = dbus.UInt32 (handle)
+ return d
def get_remote_transports_dbus(self):
return dbus.Array([