diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2012-01-30 16:08:54 +0000 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2012-01-30 16:08:54 +0000 |
commit | e0739058a22dae127e5410fd8ab4fb5dc2d49ad1 (patch) | |
tree | c3df1c4c3ab4581b2809c81d57445e8e33bec63d | |
parent | 4fe564149c374a2b30a4bfb8467b5d41f1fd4816 (diff) | |
download | telepathy-gabble-e0739058a22dae127e5410fd8ab4fb5dc2d49ad1.tar.gz |
Disable call-muc.py tests that isn't ported
-rw-r--r-- | tests/twisted/jingle/call-muc.py | 51 | ||||
-rw-r--r-- | tests/twisted/jingle/callutils.py | 7 |
2 files changed, 31 insertions, 27 deletions
diff --git a/tests/twisted/jingle/call-muc.py b/tests/twisted/jingle/call-muc.py index 40bed0058..7889385df 100644 --- a/tests/twisted/jingle/call-muc.py +++ b/tests/twisted/jingle/call-muc.py @@ -66,10 +66,9 @@ def run_incoming_test(q, bus, conn, stream, bob_leaves_room = False): check_state (q, channel, cs.CALL_STATE_PENDING_RECEIVER) - codecs = jt.get_call_audio_codecs_dbus() - - check_and_accept_offer (q, bus, conn, self_handle, 0, - content, codecs) + md = jt.get_call_audio_md_dbus() + check_and_accept_offer (q, bus, conn, self_handle, + content, md) channel.Accept (dbus_interface=cs.CHANNEL_TYPE_CALL) # Preparing stanza @@ -121,7 +120,7 @@ def run_incoming_test(q, bus, conn, stream, bob_leaves_room = False): q.unforbid_events (forbidden) content = bus.get_object (conn.bus_name, e.args[0]) - check_and_accept_offer (q, bus, conn, self_handle, 0, + check_and_accept_offer (q, bus, conn, self_handle, content, jt.get_call_video_codecs_dbus(), check_codecs_changed = False) @@ -185,13 +184,10 @@ def run_outgoing_test(q, bus, conn, stream, close_channel=False): dbus_interface = dbus.PROPERTIES_IFACE) content = bus.get_object (conn.bus_name, props['Contents'][0]) - codecs = jt.get_call_audio_codecs_dbus() - # Accept codec offer - props = content.GetAll(cs.CALL_CONTENT_IFACE_MEDIA, - dbus_interface=dbus.PROPERTIES_IFACE) - offer = bus.get_object (conn.bus_name, props["CodecOffer"][0]) - offer.Accept(codecs, dbus_interface=cs.CALL_CONTENT_CODECOFFER) + + md = jt.get_call_audio_md_dbus() + check_and_accept_offer (q, bus, conn, content, md) # Accept the channel, which means we can get muji presences q.unforbid_events (forbidden) @@ -226,9 +222,11 @@ def run_outgoing_test(q, bus, conn, stream, close_channel=False): # Bob appears and starts a session right afterwards q.expect('dbus-signal', signal = 'CallMembersChanged') - e = q.expect('dbus-signal', signal = 'NewCodecOffer') - offer = bus.get_object (conn.bus_name, e.args[1]) - offer.Accept(codecs, dbus_interface=cs.CALL_CONTENT_CODECOFFER) + q.unforbid_events(forbidden) + + e = q.expect('dbus-signal', signal = 'NewMediaDescriptionOffer') + offer = bus.get_object (conn.bus_name, e.args[0]) + offer.Accept(md, dbus_interface=cs.CALL_CONTENT_MEDIADESCRIPTION) jt.incoming_call(audio = "Audio") @@ -246,8 +244,10 @@ def run_outgoing_test(q, bus, conn, stream, close_channel=False): endpoint = bus.get_object (conn.bus_name, endpoints[0]) - endpoint.SetStreamState (cs.MEDIA_STREAM_STATE_CONNECTED, - dbus_interface=cs.CALL_STREAM_ENDPOINT) + endpoint.SetEndpointState (1, cs.MEDIA_STREAM_STATE_CONNECTED, + dbus_interface=cs.CALL_STREAM_ENDPOINT) + endpoint.SetEndpointState (2, cs.MEDIA_STREAM_STATE_CONNECTED, + dbus_interface=cs.CALL_STREAM_ENDPOINT) e = q.expect ('stream-iq', predicate = jp.action_predicate ('session-accept')) @@ -260,17 +260,13 @@ def run_outgoing_test(q, bus, conn, stream, close_channel=False): q.expect('dbus-signal', signal = 'ContentAdded') content = bus.get_object (conn.bus_name, c) - codecs = jt.get_call_video_codecs_dbus() # wait for the CodecOffer and Accept it - q.expect('dbus-signal', signal = 'NewCodecOffer') - props = content.GetAll(cs.CALL_CONTENT_IFACE_MEDIA, - dbus_interface=dbus.PROPERTIES_IFACE) - offer = bus.get_object (conn.bus_name, props["CodecOffer"][0]) - offer.Accept(codecs, dbus_interface=cs.CALL_CONTENT_CODECOFFER) - - q.unforbid_events(forbidden) + q.expect('dbus-signal', signal = 'NewMediaDescriptionOffer') + md = jt.get_call_video_md_dbus() + check_and_accept_offer (q, bus, conn, content, md) + # preparing e = q.expect('stream-presence', to = muc + "/test") echo_muc_presence (q, stream, e.stanza, 'none', 'participant') @@ -293,8 +289,8 @@ def run_outgoing_test(q, bus, conn, stream, close_channel=False): stream.send(presence) # new codec offer as bob threw in some codecs - q.expect('dbus-signal', signal='NewCodecOffer') - check_and_accept_offer (q, bus, conn, self_handle, 0, + q.expect('dbus-signal', signal='NewMediaDescriptionOffer') + check_and_accept_offer (q, bus, conn, self_handle, content, codecs, check_codecs_changed = False) # Bob sends a content @@ -353,6 +349,9 @@ def general_tests (jp, q, bus, conn, stream, path, props): assertLength(1, contents) if __name__ == '__main__': + print "FIXME: needs to be ported to Call1" + raise SystemExit(77) + exec_test (run_outgoing_test) exec_test (lambda q,b, c, s: run_outgoing_test (q, b, c, s, True)) exec_test (run_incoming_test) diff --git a/tests/twisted/jingle/callutils.py b/tests/twisted/jingle/callutils.py index 71aac39ea..3148075bd 100644 --- a/tests/twisted/jingle/callutils.py +++ b/tests/twisted/jingle/callutils.py @@ -31,12 +31,17 @@ def check_state (q, chan, state, wait = False): assertEquals (state, properties["CallState"]) -def check_and_accept_offer (q, bus, conn, content, md, remote_handle, +def check_and_accept_offer (q, bus, conn, content, md, in_remote_handle = 0, offer_path = None, md_changed = True): [path, remote_md] = content.Get(cs.CALL_CONTENT_IFACE_MEDIA, "MediaDescriptionOffer", dbus_interface=dbus.PROPERTIES_IFACE) + remote_handle = remote_md[cs.CALL_CONTENT_MEDIADESCRIPTION + '.RemoteContact'] + + if in_remote_handle != 0: + assertEquals(remote_handle, in_remote_handle) + if offer_path != None: assertEquals (offer_path, path) |