diff options
Diffstat (limited to 'tests/twisted/jingle')
-rw-r--r-- | tests/twisted/jingle/call-codecoffer.py | 12 | ||||
-rw-r--r-- | tests/twisted/jingle/call-muc.py | 4 | ||||
-rw-r--r-- | tests/twisted/jingle/call_helper.py | 11 | ||||
-rw-r--r-- | tests/twisted/jingle/session-id-collision.py | 8 | ||||
-rw-r--r-- | tests/twisted/jingle/stun-server.py | 5 |
5 files changed, 18 insertions, 22 deletions
diff --git a/tests/twisted/jingle/call-codecoffer.py b/tests/twisted/jingle/call-codecoffer.py index 987ebf3b4..9dfd5cf66 100644 --- a/tests/twisted/jingle/call-codecoffer.py +++ b/tests/twisted/jingle/call-codecoffer.py @@ -110,12 +110,12 @@ def test_incoming(jp, q, bus, conn, stream): jt2.incoming_call() - ret = q.expect_many(EventPattern('dbus-signal', signal='NewChannels', + ret = q.expect_many(EventPattern('dbus-signal', signal='NewChannel', predicate=lambda e: - cs.CHANNEL_TYPE_CALL in e.args[0][0][1].values()), + cs.CHANNEL_TYPE_CALL in e.args[1].values()), EventPattern('dbus-signal', signal='NewMediaDescriptionOffer')) - chan = bus.get_object(conn.bus_name, ret[0].args[0][0][0]) + chan = bus.get_object(conn.bus_name, ret[0].args[0]) properties = chan.GetAll(cs.CHANNEL_TYPE_CALL, dbus_interface=dbus.PROPERTIES_IFACE) @@ -172,14 +172,14 @@ def test_outgoing(jp, q, bus, conn, stream): cs.CALL_INITIAL_VIDEO: False }, dbus_interface=cs.CONN_IFACE_REQUESTS) - ret = q.expect_many(EventPattern('dbus-signal', signal='NewChannels', + ret = q.expect_many(EventPattern('dbus-signal', signal='NewChannel', predicate=lambda e: - cs.CHANNEL_TYPE_CALL in e.args[0][0][1].values()), + cs.CHANNEL_TYPE_CALL in e.args[1].values()), # a codec offer appears already! EventPattern('dbus-signal', signal='NewMediaDescriptionOffer')) # all the basic stuff is already tested in call-basics.py - chan = bus.get_object(conn.bus_name, ret[0].args[0][0][0]) + chan = bus.get_object(conn.bus_name, ret[0].args[0]) # there is no remote codec information, so this should be empty assertEquals(ret[1].args[1][cs.CALL_CONTENT_MEDIA_DESCRIPTION + ".Codecs"], []) diff --git a/tests/twisted/jingle/call-muc.py b/tests/twisted/jingle/call-muc.py index f82c07eee..2d38ceb88 100644 --- a/tests/twisted/jingle/call-muc.py +++ b/tests/twisted/jingle/call-muc.py @@ -50,9 +50,9 @@ def run_incoming_test(q, bus, conn, stream, bob_leaves_room = False): stream.send(presence) e = q.expect ('dbus-signal', - signal='NewChannels', + signal='NewChannel', predicate=lambda e: \ - e.args[0][0][1][cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_CALL ) + e.args[1][cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_CALL ) (path, props) = e.args[0][0] diff --git a/tests/twisted/jingle/call_helper.py b/tests/twisted/jingle/call_helper.py index 5c65706e4..f1f9f1e99 100644 --- a/tests/twisted/jingle/call_helper.py +++ b/tests/twisted/jingle/call_helper.py @@ -286,12 +286,9 @@ class CallTest(object): cs.CALL_INITIAL_VIDEO: self.initial_video, }) - signal = self.q.expect('dbus-signal', signal='NewChannels') + signal = self.q.expect('dbus-signal', signal='NewChannel') - assertLength(1, signal.args) - assertLength(1, signal.args[0]) # one channel - assertLength(2, signal.args[0][0]) # two struct members - emitted_props = signal.args[0][0][1] + emitted_props = signal.args[1] assertEquals( cs.CHANNEL_TYPE_CALL, emitted_props[cs.CHANNEL_TYPE]) @@ -312,7 +309,7 @@ class CallTest(object): assertEquals(self.initial_audio, emitted_props[cs.CALL_INITIAL_AUDIO]) assertEquals(self.initial_video, emitted_props[cs.CALL_INITIAL_VIDEO]) - chan_path = signal.args[0][0][0] + chan_path = signal.args[0] self.chan = wrap_channel( self.bus.get_object(self.conn.bus_name, chan_path), 'Call') @@ -322,7 +319,7 @@ class CallTest(object): # Check if all the properties are there assertEquals(sorted([ "Contents", "CallMembers", "CallState", "CallFlags", "CallStateReason", "CallStateDetails", - "HardwareStreaming", "InitialAudio", "InitialAudioName", + "HardwareStreaming", "InitialAudio", "InitialAudioName", "InitialTones", "InitialVideo", "InitialVideoName", "MutableContents", "InitialTransport", "MemberIdentifiers" ]), sorted(properties.keys())) diff --git a/tests/twisted/jingle/session-id-collision.py b/tests/twisted/jingle/session-id-collision.py index b9815407b..8fe28d452 100644 --- a/tests/twisted/jingle/session-id-collision.py +++ b/tests/twisted/jingle/session-id-collision.py @@ -27,14 +27,14 @@ def test(jp, q, bus, conn, stream): jt2.sid = '1' jt1.incoming_call() - q.expect('dbus-signal', signal='NewChannels', - predicate=lambda e: cs.CHANNEL_TYPE_CALL in e.args[0][0][1][cs.CHANNEL_TYPE]) + q.expect('dbus-signal', signal='NewChannel', + predicate=lambda e: cs.CHANNEL_TYPE_CALL in e.args[1][cs.CHANNEL_TYPE]) # If Gabble confuses the two sessions, it'll NAK the IQ rather than # realising this is a new call. jt2.incoming_call() - q.expect('dbus-signal', signal='NewChannels', - predicate=lambda e: cs.CHANNEL_TYPE_CALL in e.args[0][0][1][cs.CHANNEL_TYPE]) + q.expect('dbus-signal', signal='NewChannel', + predicate=lambda e: cs.CHANNEL_TYPE_CALL in e.args[1][cs.CHANNEL_TYPE]) # On the other hand, if the same person calls twice with the same sid, # Gabble _should_ NAK the second s-i. diff --git a/tests/twisted/jingle/stun-server.py b/tests/twisted/jingle/stun-server.py index 6fb471174..f140f25d0 100644 --- a/tests/twisted/jingle/stun-server.py +++ b/tests/twisted/jingle/stun-server.py @@ -108,10 +108,9 @@ def test_call(jp, q, bus, conn, stream, assertLength(0, e.args) assertEquals(e.interface, cs.CALL_STREAM_IFACE_MEDIA) - e = q.expect('dbus-signal', signal='NewChannels') - assert e.args[0][0][0] + e = q.expect('dbus-signal', signal='NewChannel') - call_chan = make_channel_proxy(conn, e.args[0][0][0], 'Channel') + call_chan = make_channel_proxy(conn, e.args[0], 'Channel') # Exercise channel properties channel_props = call_chan.GetAll( |