From 8013bb1cfecf410466370c5d337490e30c02ced1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 11 Mar 2020 14:43:21 +0100 Subject: And modify the tests to work, by adding the node in all join presences --- tests/end_to_end/scenarios/channel_custom_topic.py | 2 +- tests/end_to_end/scenarios/channel_history.py | 2 +- .../scenarios/channel_history_on_fixed_server.py | 2 +- .../scenarios/channel_join_on_fixed_irc_server.py | 2 +- .../scenarios/channel_join_with_different_nick.py | 9 +++++++-- .../scenarios/channel_join_with_password.py | 2 +- .../scenarios/channel_join_with_two_users.py | 2 +- tests/end_to_end/scenarios/channel_list_escaping.py | 2 +- tests/end_to_end/scenarios/channel_list_with_rsm.py | 4 ++-- tests/end_to_end/scenarios/channel_messages.py | 4 ++-- tests/end_to_end/scenarios/client_error.py | 2 +- .../complete_channel_list_with_pages_of_3.py | 20 ++++++++++---------- .../scenarios/default_channel_list_limit.py | 4 ++-- tests/end_to_end/scenarios/default_mam_limit.py | 2 +- tests/end_to_end/scenarios/encoded_channel_join.py | 2 +- ...ute_admin_disconnect_from_server_adhoc_command.py | 6 +++--- .../execute_disconnect_user_adhoc_command.py | 2 +- .../scenarios/fixed_irc_server_subscription.py | 2 +- .../end_to_end/scenarios/get_irc_connection_info.py | 2 +- .../scenarios/get_irc_connection_info_fixed.py | 2 +- tests/end_to_end/scenarios/invite_other.py | 4 ++-- tests/end_to_end/scenarios/irc_server_connection.py | 2 +- .../scenarios/irc_server_connection_failure.py | 2 +- .../scenarios/irc_server_presence_in_roster.py | 2 +- tests/end_to_end/scenarios/irc_tls_connection.py | 2 +- tests/end_to_end/scenarios/join_history_limit.py | 4 ++-- tests/end_to_end/scenarios/leave_unjoined_chan.py | 4 ++-- tests/end_to_end/scenarios/muc_disco_info.py | 2 +- tests/end_to_end/scenarios/multiline_message.py | 2 +- tests/end_to_end/scenarios/multiple_channels_join.py | 4 ++-- tests/end_to_end/scenarios/multisession_kick.py | 4 ++-- tests/end_to_end/scenarios/multisessionnick.py | 6 +++--- tests/end_to_end/scenarios/nick_change_in_join.py | 4 ++-- tests/end_to_end/scenarios/not_connected_error.py | 2 +- tests/end_to_end/scenarios/persistent_channel.py | 4 ++-- tests/end_to_end/scenarios/raw_message.py | 2 +- .../scenarios/raw_message_fixed_irc_server.py | 2 +- ..._is_removed_from_server_when_last_chan_is_left.py | 6 +++--- .../scenarios/self_ping_on_real_channel.py | 2 +- tests/end_to_end/scenarios/self_version.py | 2 +- tests/end_to_end/scenarios/simple_channel_join.py | 2 +- .../scenarios/simple_channel_join_fixed.py | 2 +- tests/end_to_end/scenarios/simple_kick.py | 4 ++-- 43 files changed, 75 insertions(+), 70 deletions(-) diff --git a/tests/end_to_end/scenarios/channel_custom_topic.py b/tests/end_to_end/scenarios/channel_custom_topic.py index 1fbfb5c..3b3104e 100644 --- a/tests/end_to_end/scenarios/channel_custom_topic.py +++ b/tests/end_to_end/scenarios/channel_custom_topic.py @@ -10,7 +10,7 @@ scenario = ( expect_stanza("/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat'][@to='{jid_one}/{resource_one}']/subject[text()='TOPIC TEST']"), # Second user joins - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_two}/{resource_one}'), expect_unordered( [ diff --git a/tests/end_to_end/scenarios/channel_history.py b/tests/end_to_end/scenarios/channel_history.py index ade978b..0014d65 100644 --- a/tests/end_to_end/scenarios/channel_history.py +++ b/tests/end_to_end/scenarios/channel_history.py @@ -8,7 +8,7 @@ scenario = ( expect_stanza("/message[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_one}/{resource_one}'][@type='groupchat']/body[text()='coucou']"), # Second user joins - send_stanza(""), + send_stanza(""), expect_stanza("/presence[@to='{jid_one}/{resource_two}'][@from='#foo%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@jid='{lower_nick_one}%{irc_server_one}/~{nick_one}@localhost'][@role='moderator']", "/presence/muc_user:x/muc_user:status[@code='110']"), # Receive the history message diff --git a/tests/end_to_end/scenarios/channel_history_on_fixed_server.py b/tests/end_to_end/scenarios/channel_history_on_fixed_server.py index 40a665b..0e957e1 100644 --- a/tests/end_to_end/scenarios/channel_history_on_fixed_server.py +++ b/tests/end_to_end/scenarios/channel_history_on_fixed_server.py @@ -10,7 +10,7 @@ scenario = ( expect_stanza("/message[@from='#foo@{biboumi_host}/{nick_one}'][@to='{jid_one}/{resource_one}'][@type='groupchat']/body[text()='coucou']"), # Second user joins - send_stanza(""), + send_stanza(""), expect_stanza("/presence[@to='{jid_one}/{resource_two}'][@from='#foo@{biboumi_host}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@jid='{lower_nick_one}@{biboumi_host}/~{nick_one}@localhost'][@role='moderator']", "/presence/muc_user:x/muc_user:status[@code='110']"), # Receive the history message diff --git a/tests/end_to_end/scenarios/channel_join_on_fixed_irc_server.py b/tests/end_to_end/scenarios/channel_join_on_fixed_irc_server.py index 1fe9908..40f53b8 100644 --- a/tests/end_to_end/scenarios/channel_join_on_fixed_irc_server.py +++ b/tests/end_to_end/scenarios/channel_join_on_fixed_irc_server.py @@ -4,7 +4,7 @@ conf = "fixed_server" scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}', fixed_irc_server=True), expect_stanza("/message/body[text()='Mode #foo [+nt] by {irc_host_one}']"), expect_stanza("/presence[@to='{jid_one}/{resource_one}'][@from='#foo@{biboumi_host}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", diff --git a/tests/end_to_end/scenarios/channel_join_with_different_nick.py b/tests/end_to_end/scenarios/channel_join_with_different_nick.py index 388b098..c499184 100644 --- a/tests/end_to_end/scenarios/channel_join_with_different_nick.py +++ b/tests/end_to_end/scenarios/channel_join_with_different_nick.py @@ -3,12 +3,17 @@ from scenarios import * from scenarios.simple_channel_join import expect_self_join_presence scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}'), expect_self_join_presence(jid = '{jid_one}/{resource_one}', chan = "#foo", nick = "{nick_one}"), # The same resource joins a different channel with a different nick - send_stanza(""), + send_stanza(""), # We must receive a join presence in response, without any nick change (nick_two) must be ignored expect_self_join_presence(jid = '{jid_one}/{resource_one}', chan = "#bar", nick = "{nick_one}"), + # An different resource joins the same channel, with a different nick + send_stanza(""), + # We must receive a join presence in response, without any nick change (nick_two) must be ignored + expect_stanza("/presence[@to='{jid_one}/{resource_two}'][@from='#foo%{irc_server_one}/{nick_one}']"), + expect_stanza("/message/subject"), ) diff --git a/tests/end_to_end/scenarios/channel_join_with_password.py b/tests/end_to_end/scenarios/channel_join_with_password.py index 4c5e508..b52a06a 100644 --- a/tests/end_to_end/scenarios/channel_join_with_password.py +++ b/tests/end_to_end/scenarios/channel_join_with_password.py @@ -10,7 +10,7 @@ scenario = ( expect_stanza("/message[@from='#foo%{irc_server_one}'][@to='{jid_one}/{resource_one}'][@type='groupchat']/body[text()='Mode #foo [+k SECRET] by {nick_one}']"), # Second user tries to join, without a password (error ensues) - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_two}/{resource_one}'), expect_stanza("/message/body[text()='{irc_host_one}: #foo: Cannot join channel (+k) - bad key']"), expect_stanza("/presence[@type='error'][@from='#foo%{irc_server_one}/{nick_two}']/error[@type='auth']/stanza:not-authorized"), diff --git a/tests/end_to_end/scenarios/channel_join_with_two_users.py b/tests/end_to_end/scenarios/channel_join_with_two_users.py index 4e22c50..3b2b102 100644 --- a/tests/end_to_end/scenarios/channel_join_with_two_users.py +++ b/tests/end_to_end/scenarios/channel_join_with_two_users.py @@ -4,7 +4,7 @@ scenario = ( scenarios.simple_channel_join.scenario, # Second user joins - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_two}/{resource_one}'), expect_unordered( [ diff --git a/tests/end_to_end/scenarios/channel_list_escaping.py b/tests/end_to_end/scenarios/channel_list_escaping.py index 12c3ff9..96e0758 100644 --- a/tests/end_to_end/scenarios/channel_list_escaping.py +++ b/tests/end_to_end/scenarios/channel_list_escaping.py @@ -1,7 +1,7 @@ from scenarios import * scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}'), expect_stanza("/message/body[text()='Mode #true/false [+nt] by {irc_host_one}']"), expect_stanza("/presence[@to='{jid_one}/{resource_one}'][@from='#true\\2ffalse%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", diff --git a/tests/end_to_end/scenarios/channel_list_with_rsm.py b/tests/end_to_end/scenarios/channel_list_with_rsm.py index 79e76f4..5455c42 100644 --- a/tests/end_to_end/scenarios/channel_list_with_rsm.py +++ b/tests/end_to_end/scenarios/channel_list_with_rsm.py @@ -3,12 +3,12 @@ from scenarios import * scenario = ( scenarios.simple_channel_join.scenario, - send_stanza(""), + send_stanza(""), expect_stanza("/message/body[text()='Mode #bar [+nt] by {irc_host_one}']"), expect_stanza("/presence"), expect_stanza("/message[@from='#bar%{irc_server_one}'][@type='groupchat']/subject[not(text())]"), - send_stanza(""), + send_stanza(""), expect_stanza("/message/body[text()='Mode #coucou [+nt] by {irc_host_one}']"), expect_stanza("/presence"), expect_stanza("/message[@from='#coucou%{irc_server_one}'][@type='groupchat']/subject[not(text())]"), diff --git a/tests/end_to_end/scenarios/channel_messages.py b/tests/end_to_end/scenarios/channel_messages.py index 8ea979c..cc358e1 100644 --- a/tests/end_to_end/scenarios/channel_messages.py +++ b/tests/end_to_end/scenarios/channel_messages.py @@ -6,7 +6,7 @@ scenario = ( scenarios.simple_channel_join.scenario, # Second user joins - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_two}/{resource_one}'), # Our presence, sent to the other user, and ourself @@ -45,7 +45,7 @@ scenario = ( "/message/muc_user:x"), # Do the exact same thing, from a different chan, # to check if the response comes from the right JID - send_stanza(""), + send_stanza(""), expect_stanza("/message"), expect_stanza("/presence/muc_user:x/muc_user:status[@code='110']"), expect_stanza("/message[@from='#dummy%{irc_server_one}'][@type='groupchat']/subject"), diff --git a/tests/end_to_end/scenarios/client_error.py b/tests/end_to_end/scenarios/client_error.py index ca5eaee..8c6fd7e 100644 --- a/tests/end_to_end/scenarios/client_error.py +++ b/tests/end_to_end/scenarios/client_error.py @@ -3,7 +3,7 @@ from scenarios import * scenario = ( scenarios.simple_channel_join.scenario, # Second resource, same channel - send_stanza(""), + send_stanza(""), expect_stanza("/presence[@to='{jid_one}/{resource_two}'][@from='#foo%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", "/presence/muc_user:x/muc_user:status[@code='110']"), expect_stanza("/message[@from='#foo%{irc_server_one}'][@type='groupchat'][@to='{jid_one}/{resource_two}']/subject[not(text())]"), diff --git a/tests/end_to_end/scenarios/complete_channel_list_with_pages_of_3.py b/tests/end_to_end/scenarios/complete_channel_list_with_pages_of_3.py index 8cef926..9971ccd 100644 --- a/tests/end_to_end/scenarios/complete_channel_list_with_pages_of_3.py +++ b/tests/end_to_end/scenarios/complete_channel_list_with_pages_of_3.py @@ -1,53 +1,53 @@ from scenarios import * scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}'), expect_stanza("/message"), expect_stanza("/presence"), expect_stanza("/message"), - send_stanza(""), + send_stanza(""), expect_stanza("/message"), expect_stanza("/presence"), expect_stanza("/message"), - send_stanza(""), + send_stanza(""), expect_stanza("/message"), expect_stanza("/presence"), expect_stanza("/message"), - send_stanza(""), + send_stanza(""), expect_stanza("/message"), expect_stanza("/presence"), expect_stanza("/message"), - send_stanza(""), + send_stanza(""), expect_stanza("/message"), expect_stanza("/presence"), expect_stanza("/message"), - send_stanza(""), + send_stanza(""), expect_stanza("/message"), expect_stanza("/presence"), expect_stanza("/message"), - send_stanza(""), + send_stanza(""), expect_stanza("/message"), expect_stanza("/presence"), expect_stanza("/message"), - send_stanza(""), + send_stanza(""), expect_stanza("/message"), expect_stanza("/presence"), expect_stanza("/message"), - send_stanza(""), + send_stanza(""), expect_stanza("/message"), expect_stanza("/presence"), expect_stanza("/message"), - send_stanza(""), + send_stanza(""), expect_stanza("/message"), expect_stanza("/presence"), expect_stanza("/message"), diff --git a/tests/end_to_end/scenarios/default_channel_list_limit.py b/tests/end_to_end/scenarios/default_channel_list_limit.py index 84f96b3..ae9f5b2 100644 --- a/tests/end_to_end/scenarios/default_channel_list_limit.py +++ b/tests/end_to_end/scenarios/default_channel_list_limit.py @@ -26,14 +26,14 @@ scenario = ( after = save_value("counter", counter)), - send_stanza(""), + send_stanza(""), sequences.connection(), scenarios.simple_channel_join.expect_self_join_presence(jid = '{jid_one}/{resource_one}', chan = "#foo", nick = "{nick_one}"), ( - send_stanza(""), + send_stanza(""), expect_stanza("/message"), expect_stanza("/presence", after = save_value("counter", counter)), diff --git a/tests/end_to_end/scenarios/default_mam_limit.py b/tests/end_to_end/scenarios/default_mam_limit.py index 02fcaa7..2363b15 100644 --- a/tests/end_to_end/scenarios/default_mam_limit.py +++ b/tests/end_to_end/scenarios/default_mam_limit.py @@ -14,7 +14,7 @@ scenario = ( ""), expect_stanza("/iq[@type='result']/commands:command[@node='configure'][@status='completed']/commands:note[@type='info'][text()='Configuration successfully applied.']"), - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}'), expect_stanza("/message/body[text()='Mode #foo [+nt] by {irc_host_one}']"), expect_stanza("/presence[@to='{jid_one}/{resource_one}'][@from='#foo%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", diff --git a/tests/end_to_end/scenarios/encoded_channel_join.py b/tests/end_to_end/scenarios/encoded_channel_join.py index fd4144a..2903d9a 100644 --- a/tests/end_to_end/scenarios/encoded_channel_join.py +++ b/tests/end_to_end/scenarios/encoded_channel_join.py @@ -1,7 +1,7 @@ from scenarios import * scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}'), expect_stanza("/message/body[text()='Mode #biboumi@louiz.org:80 [+nt] by {irc_host_one}']"), expect_stanza("/presence[@to='{jid_one}/{resource_one}'][@from='#biboumi\\40louiz.org\\3a80%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", diff --git a/tests/end_to_end/scenarios/execute_admin_disconnect_from_server_adhoc_command.py b/tests/end_to_end/scenarios/execute_admin_disconnect_from_server_adhoc_command.py index 18dfe94..7f3c04c 100644 --- a/tests/end_to_end/scenarios/execute_admin_disconnect_from_server_adhoc_command.py +++ b/tests/end_to_end/scenarios/execute_admin_disconnect_from_server_adhoc_command.py @@ -4,17 +4,17 @@ from scenarios.simple_channel_join import expect_self_join_presence scenario = ( # Admin connects to first server - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_admin}/{resource_one}'), expect_self_join_presence(jid = '{jid_admin}/{resource_one}', chan = "#bar", nick = "{nick_one}"), # Non-Admin connects to first server - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}'), expect_self_join_presence(jid = '{jid_one}/{resource_one}', chan = "#foo", nick = "{nick_two}"), # Non-admin connects to second server - send_stanza(""), + send_stanza(""), sequences.connection("{irc_host_two}", '{jid_one}/{resource_two}'), expect_self_join_presence(jid = '{jid_one}/{resource_two}', chan = "#bon", nick = "{nick_three}", irc_server = "{irc_server_two}"), diff --git a/tests/end_to_end/scenarios/execute_disconnect_user_adhoc_command.py b/tests/end_to_end/scenarios/execute_disconnect_user_adhoc_command.py index a680017..6ce5231 100644 --- a/tests/end_to_end/scenarios/execute_disconnect_user_adhoc_command.py +++ b/tests/end_to_end/scenarios/execute_disconnect_user_adhoc_command.py @@ -3,7 +3,7 @@ from scenarios import * from scenarios.simple_channel_join import expect_self_join_presence scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_admin}/{resource_one}'), expect_self_join_presence(jid = '{jid_admin}/{resource_one}', chan = "#foo", nick = "{nick_one}"), diff --git a/tests/end_to_end/scenarios/fixed_irc_server_subscription.py b/tests/end_to_end/scenarios/fixed_irc_server_subscription.py index 091cf2a..f255b19 100644 --- a/tests/end_to_end/scenarios/fixed_irc_server_subscription.py +++ b/tests/end_to_end/scenarios/fixed_irc_server_subscription.py @@ -3,6 +3,6 @@ from scenarios import * conf = 'fixed_server' scenario = ( - send_stanza(""), + send_stanza(""), expect_stanza("/presence[@to='{jid_one}'][@from='{biboumi_host}'][@type='subscribed']") ) diff --git a/tests/end_to_end/scenarios/get_irc_connection_info.py b/tests/end_to_end/scenarios/get_irc_connection_info.py index 25f2a87..3846487 100644 --- a/tests/end_to_end/scenarios/get_irc_connection_info.py +++ b/tests/end_to_end/scenarios/get_irc_connection_info.py @@ -4,7 +4,7 @@ scenario = ( send_stanza(""), expect_stanza("/iq/commands:command/commands:note[text()='You are not connected to the IRC server irc.localhost']"), - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}'), expect_stanza("/message"), expect_stanza("/presence"), diff --git a/tests/end_to_end/scenarios/get_irc_connection_info_fixed.py b/tests/end_to_end/scenarios/get_irc_connection_info_fixed.py index d9be151..dbdbe4f 100644 --- a/tests/end_to_end/scenarios/get_irc_connection_info_fixed.py +++ b/tests/end_to_end/scenarios/get_irc_connection_info_fixed.py @@ -6,7 +6,7 @@ scenario = ( send_stanza(""), expect_stanza("/iq/commands:command/commands:note[text()='You are not connected to the IRC server irc.localhost']"), - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}', fixed_irc_server=True), expect_stanza("/message"), expect_stanza("/presence"), diff --git a/tests/end_to_end/scenarios/invite_other.py b/tests/end_to_end/scenarios/invite_other.py index 2badf77..dd83684 100644 --- a/tests/end_to_end/scenarios/invite_other.py +++ b/tests/end_to_end/scenarios/invite_other.py @@ -1,13 +1,13 @@ from scenarios import * scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}'), expect_stanza("/message"), expect_stanza("/presence"), expect_stanza("/message"), - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_two}/{resource_two}'), expect_stanza("/message"), expect_stanza("/presence"), diff --git a/tests/end_to_end/scenarios/irc_server_connection.py b/tests/end_to_end/scenarios/irc_server_connection.py index 25ea749..f31b60f 100644 --- a/tests/end_to_end/scenarios/irc_server_connection.py +++ b/tests/end_to_end/scenarios/irc_server_connection.py @@ -1,7 +1,7 @@ from scenarios import * scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection(), ) diff --git a/tests/end_to_end/scenarios/irc_server_connection_failure.py b/tests/end_to_end/scenarios/irc_server_connection_failure.py index 2abe39f..adcbc57 100644 --- a/tests/end_to_end/scenarios/irc_server_connection_failure.py +++ b/tests/end_to_end/scenarios/irc_server_connection_failure.py @@ -1,7 +1,7 @@ from scenarios import * scenario = ( - send_stanza(""), + send_stanza(""), expect_stanza("/message/body[text()='Connecting to doesnotexist:6697 (encrypted)']"), expect_stanza("/message/body[re:test(text(), 'Connection failed: (Domain name not found|Name or service not known)')]"), expect_stanza("/presence[@from='#foo%doesnotexist@{biboumi_host}/{nick_one}']/muc:x", diff --git a/tests/end_to_end/scenarios/irc_server_presence_in_roster.py b/tests/end_to_end/scenarios/irc_server_presence_in_roster.py index bc2016d..bd6d26e 100644 --- a/tests/end_to_end/scenarios/irc_server_presence_in_roster.py +++ b/tests/end_to_end/scenarios/irc_server_presence_in_roster.py @@ -9,7 +9,7 @@ scenario = ( send_stanza(""), # Join a channel on that server - send_stanza(""), + send_stanza(""), # We must receive the IRC server presence, in the connection sequence sequences.connection("irc.localhost", '{jid_one}/{resource_one}', expected_irc_presence=True), diff --git a/tests/end_to_end/scenarios/irc_tls_connection.py b/tests/end_to_end/scenarios/irc_tls_connection.py index 8b30893..ce11877 100644 --- a/tests/end_to_end/scenarios/irc_tls_connection.py +++ b/tests/end_to_end/scenarios/irc_tls_connection.py @@ -16,7 +16,7 @@ scenario = ( ""), expect_stanza("/iq[@type='result']/commands:command[@node='configure'][@status='completed']/commands:note[@type='info'][text()='Configuration successfully applied.']"), - send_stanza(""), + send_stanza(""), sequences.connection_tls("irc.localhost", '{jid_one}/{resource_one}'), expect_stanza("/message/body[text()='Mode #foo [+nt] by {irc_host_one}']"), expect_stanza("/presence[@to='{jid_one}/{resource_one}'][@from='#foo%{irc_server_one}/my_special_nickname']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", diff --git a/tests/end_to_end/scenarios/join_history_limit.py b/tests/end_to_end/scenarios/join_history_limit.py index 2432f14..94f9579 100644 --- a/tests/end_to_end/scenarios/join_history_limit.py +++ b/tests/end_to_end/scenarios/join_history_limit.py @@ -15,7 +15,7 @@ scenario = ( expect_stanza("/iq[@type='result']/commands:command[@node='configure'][@status='completed']/commands:note[@type='info'][text()='Configuration successfully applied.']"), - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}'), expect_stanza("/message/body[text()='Mode #foo [+nt] by {irc_host_one}']"), expect_stanza("/presence[@to='{jid_one}/{resource_one}'][@from='#foo%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", @@ -41,7 +41,7 @@ scenario = ( after = save_current_timestamp_plus_delta("second_timestamp", datetime.timedelta(seconds=1))), # join some other channel, to stay connected to the server even after leaving #foo - send_stanza(""), + send_stanza(""), expect_stanza("/message"), expect_stanza("/presence/muc_user:x/muc_user:status[@code='110']"), expect_stanza("/message/subject"), diff --git a/tests/end_to_end/scenarios/leave_unjoined_chan.py b/tests/end_to_end/scenarios/leave_unjoined_chan.py index a9751d7..445480b 100644 --- a/tests/end_to_end/scenarios/leave_unjoined_chan.py +++ b/tests/end_to_end/scenarios/leave_unjoined_chan.py @@ -1,13 +1,13 @@ from scenarios import * scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}'), expect_stanza("/message"), expect_stanza("/presence"), expect_stanza("/message"), - send_stanza(""), + send_stanza(""), sequences.connection_begin("irc.localhost", '{jid_two}/{resource_two}'), expect_stanza("/message[@to='{jid_two}/{resource_two}'][@type='chat']/body[text()='irc.localhost: {nick_one}: Nickname is already in use.']"), diff --git a/tests/end_to_end/scenarios/muc_disco_info.py b/tests/end_to_end/scenarios/muc_disco_info.py index 19e90f2..0c1aea5 100644 --- a/tests/end_to_end/scenarios/muc_disco_info.py +++ b/tests/end_to_end/scenarios/muc_disco_info.py @@ -13,7 +13,7 @@ scenario = ( "!/iq/disco_info:query/dataform:x/dataform:field[@var='muc#roominfo_occupants']"), # Join the channel, and re-do the same query - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}'), expect_stanza("/message/body[text()='Mode #foo [+nt] by {irc_host_one}']"), expect_stanza("/presence[@to='{jid_one}/{resource_one}'][@from='#foo%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", diff --git a/tests/end_to_end/scenarios/multiline_message.py b/tests/end_to_end/scenarios/multiline_message.py index fc88e66..cd42c6c 100644 --- a/tests/end_to_end/scenarios/multiline_message.py +++ b/tests/end_to_end/scenarios/multiline_message.py @@ -34,7 +34,7 @@ scenario = ( # joining the room with the new user. sleep_for(0.2), # Second user joins - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_two}/{resource_one}'), # Our presence, sent to the other user expect_unordered( diff --git a/tests/end_to_end/scenarios/multiple_channels_join.py b/tests/end_to_end/scenarios/multiple_channels_join.py index 84e4360..839909f 100644 --- a/tests/end_to_end/scenarios/multiple_channels_join.py +++ b/tests/end_to_end/scenarios/multiple_channels_join.py @@ -4,8 +4,8 @@ from scenarios.simple_channel_join import expect_self_join_presence scenario = ( # Join 3 rooms, on the same server, with three different nicks - send_stanza(""), - send_stanza(""), + send_stanza(""), + send_stanza(""), send_stanza(" SECRET"), sequences.connection(), diff --git a/tests/end_to_end/scenarios/multisession_kick.py b/tests/end_to_end/scenarios/multisession_kick.py index 7d8679f..4f0627e 100644 --- a/tests/end_to_end/scenarios/multisession_kick.py +++ b/tests/end_to_end/scenarios/multisession_kick.py @@ -4,7 +4,7 @@ scenario = ( scenarios.simple_channel_join.scenario, # Second user joins, from two resources - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_two}/{resource_one}'), expect_unordered( ["/presence/muc_user:x/muc_user:item[@affiliation='none'][@role='participant']"], @@ -13,7 +13,7 @@ scenario = ( ["/message/subject"] ), # Second resource - send_stanza(""), + send_stanza(""), expect_stanza("/presence[@to='{jid_two}/{resource_two}'][@from='#foo%{irc_server_one}/{nick_one}']"), expect_stanza("/presence[@to='{jid_two}/{resource_two}'][@from='#foo%{irc_server_one}/{nick_two}']", "/presence/muc_user:x/muc_user:status[@code='110']" diff --git a/tests/end_to_end/scenarios/multisessionnick.py b/tests/end_to_end/scenarios/multisessionnick.py index 4e72ce7..f47b18e 100644 --- a/tests/end_to_end/scenarios/multisessionnick.py +++ b/tests/end_to_end/scenarios/multisessionnick.py @@ -4,12 +4,12 @@ from scenarios.simple_channel_join import expect_self_join_presence scenario = ( # Resource one joins a channel - send_stanza(""), + send_stanza(""), sequences.connection(), expect_self_join_presence(jid = '{jid_one}/{resource_one}', chan = "#foo", nick = "{nick_one}"), # The other resources joins the same room, with the same nick - send_stanza(""), + send_stanza(""), # We receive our own join expect_unordered( @@ -24,7 +24,7 @@ scenario = ( ), # A different user joins the same room - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_two}/{resource_one}'), expect_unordered( # The new user’s presence is sent to the the existing occupant (two resources) diff --git a/tests/end_to_end/scenarios/nick_change_in_join.py b/tests/end_to_end/scenarios/nick_change_in_join.py index 47aecc6..baabb2e 100644 --- a/tests/end_to_end/scenarios/nick_change_in_join.py +++ b/tests/end_to_end/scenarios/nick_change_in_join.py @@ -3,11 +3,11 @@ from scenarios import * from scenarios.simple_channel_join import expect_self_join_presence scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection(), expect_self_join_presence(jid = '{jid_one}/{resource_one}', chan = "#foo", nick = "{nick_one}"), - send_stanza(""), + send_stanza(""), expect_stanza("/message/body[text()='Mode #bar [+nt] by {irc_host_one}']"), expect_stanza("/presence[@to='{jid_one}/{resource_one}'][@from='#bar%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", "/presence/muc_user:x/muc_user:status[@code='110']", diff --git a/tests/end_to_end/scenarios/not_connected_error.py b/tests/end_to_end/scenarios/not_connected_error.py index cc9fb35..577b324 100644 --- a/tests/end_to_end/scenarios/not_connected_error.py +++ b/tests/end_to_end/scenarios/not_connected_error.py @@ -6,7 +6,7 @@ scenario = ( send_stanza(""), # Fixme: what is the purpose of this test? Check that we don’t receive anything here…? - send_stanza(""), + send_stanza(""), sequences.connection(), expect_self_join_presence(jid='{jid_one}/{resource_one}', chan="#foo", nick="{nick_one}"), ) diff --git a/tests/end_to_end/scenarios/persistent_channel.py b/tests/end_to_end/scenarios/persistent_channel.py index 3521a84..ab525fe 100644 --- a/tests/end_to_end/scenarios/persistent_channel.py +++ b/tests/end_to_end/scenarios/persistent_channel.py @@ -17,7 +17,7 @@ scenario = ( expect_stanza("/iq[@type='result']/muc_owner:query/dataform:x/dataform:field[@var='persistent'][@type='boolean']/dataform:value[text()='true']"), # A second user joins the same channel - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_two}/{resource_one}'), expect_unordered( ["/presence[@to='{jid_one}/{resource_one}'][@from='#foo%{irc_server_one}/{nick_two}']"], @@ -26,8 +26,8 @@ scenario = ( "/presence/muc_user:x/muc_user:status[@code='110']" ], ["/presence[@to='{jid_two}/{resource_one}'][@from='#foo%{irc_server_one}/{nick_one}']"], + ["/message[@from='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]"] ), - expect_stanza("/message[@from='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]"), # First user leaves the room (but biboumi will stay in the channel) send_stanza(""), diff --git a/tests/end_to_end/scenarios/raw_message.py b/tests/end_to_end/scenarios/raw_message.py index 96a3f3d..ddacdbe 100644 --- a/tests/end_to_end/scenarios/raw_message.py +++ b/tests/end_to_end/scenarios/raw_message.py @@ -1,7 +1,7 @@ from scenarios import * scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}'), expect_stanza("/message"), expect_stanza("/presence"), diff --git a/tests/end_to_end/scenarios/raw_message_fixed_irc_server.py b/tests/end_to_end/scenarios/raw_message_fixed_irc_server.py index 8196d12..b8858a5 100644 --- a/tests/end_to_end/scenarios/raw_message_fixed_irc_server.py +++ b/tests/end_to_end/scenarios/raw_message_fixed_irc_server.py @@ -3,7 +3,7 @@ from scenarios import * conf = 'fixed_server' scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}', fixed_irc_server=True), expect_stanza("/message"), expect_stanza("/presence"), diff --git a/tests/end_to_end/scenarios/resource_is_removed_from_server_when_last_chan_is_left.py b/tests/end_to_end/scenarios/resource_is_removed_from_server_when_last_chan_is_left.py index 8d208f0..f1ad137 100644 --- a/tests/end_to_end/scenarios/resource_is_removed_from_server_when_last_chan_is_left.py +++ b/tests/end_to_end/scenarios/resource_is_removed_from_server_when_last_chan_is_left.py @@ -2,7 +2,7 @@ from scenarios import * scenario = ( # Join the channel - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}'), expect_stanza("/message/body[text()='Mode #foo [+nt] by {irc_host_one}']"), expect_stanza("/presence[@to='{jid_one}/{resource_one}'][@from='#foo%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", @@ -19,13 +19,13 @@ scenario = ( expect_stanza("/presence[@type='unavailable'][@from='#foo%{irc_server_one}/{nick_one}']"), # Join the same channel, with the same JID, but a different resource - send_stanza(""), + send_stanza(""), expect_stanza("/presence[@to='{jid_one}/{resource_two}'][@from='#foo%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", "/presence/muc_user:x/muc_user:status[@code='110']"), expect_stanza("/message[@from='#foo%{irc_server_one}'][@type='groupchat'][@to='{jid_one}/{resource_two}']/subject[not(text())]"), # Join some other channel with someone else - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_two}/{resource_one}'), expect_stanza("/message/body[text()='Mode #bar [+nt] by {irc_host_one}']"), expect_stanza("/presence[@to='{jid_two}/{resource_one}'][@from='#bar%{irc_server_one}/{nick_two}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", diff --git a/tests/end_to_end/scenarios/self_ping_on_real_channel.py b/tests/end_to_end/scenarios/self_ping_on_real_channel.py index 6cbb210..3474288 100644 --- a/tests/end_to_end/scenarios/self_ping_on_real_channel.py +++ b/tests/end_to_end/scenarios/self_ping_on_real_channel.py @@ -8,7 +8,7 @@ scenario = ( expect_stanza("/iq[@from='#foo%{irc_server_one}/{nick_one}'][@type='result'][@to='{jid_one}/{resource_one}'][@id='first_ping']"), # Now join the same room, from the same bare JID, behind the same nick - send_stanza(""), + send_stanza(""), expect_stanza("/presence[@to='{jid_one}/{resource_two}'][@from='#foo%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", "/presence/muc_user:x/muc_user:status[@code='110']"), diff --git a/tests/end_to_end/scenarios/self_version.py b/tests/end_to_end/scenarios/self_version.py index f567355..a5c81eb 100644 --- a/tests/end_to_end/scenarios/self_version.py +++ b/tests/end_to_end/scenarios/self_version.py @@ -13,7 +13,7 @@ scenario = ( expect_stanza("/iq[@from='#foo%{irc_server_one}/{nick_one}'][@type='result'][@to='{jid_one}/{resource_one}'][@id='first_version']/version:query/version:name[text()='e2e test (through the biboumi gateway) 1.0 Fedora']"), # Now join the same room, from the same bare JID, behind the same nick - send_stanza(""), + send_stanza(""), expect_stanza("/presence[@to='{jid_one}/{resource_two}'][@from='#foo%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", "/presence/muc_user:x/muc_user:status[@code='110']"), expect_stanza("/message[@from='#foo%{irc_server_one}'][@type='groupchat'][@to='{jid_one}/{resource_two}']/subject[not(text())]"), diff --git a/tests/end_to_end/scenarios/simple_channel_join.py b/tests/end_to_end/scenarios/simple_channel_join.py index b09d6be..cb41ca1 100644 --- a/tests/end_to_end/scenarios/simple_channel_join.py +++ b/tests/end_to_end/scenarios/simple_channel_join.py @@ -12,7 +12,7 @@ def expect_self_join_presence(jid, chan, nick, irc_server="{irc_server_one}"): scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection(), expect_self_join_presence(jid = '{jid_one}/{resource_one}', chan = "#foo", nick = "{nick_one}"), diff --git a/tests/end_to_end/scenarios/simple_channel_join_fixed.py b/tests/end_to_end/scenarios/simple_channel_join_fixed.py index 6efd20f..87816c3 100644 --- a/tests/end_to_end/scenarios/simple_channel_join_fixed.py +++ b/tests/end_to_end/scenarios/simple_channel_join_fixed.py @@ -3,7 +3,7 @@ from scenarios import * conf = "fixed_server" scenario = ( - send_stanza(""), + send_stanza(""), sequences.connection("irc.localhost", '{jid_one}/{resource_one}', fixed_irc_server=True), expect_stanza("/message/body[text()='Mode #foo [+nt] by {irc_host_one}']"), expect_stanza("/presence[@to='{jid_one}/{resource_one}'][@from='#foo@{biboumi_host}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", diff --git a/tests/end_to_end/scenarios/simple_kick.py b/tests/end_to_end/scenarios/simple_kick.py index 0e06589..20d56b0 100644 --- a/tests/end_to_end/scenarios/simple_kick.py +++ b/tests/end_to_end/scenarios/simple_kick.py @@ -4,13 +4,13 @@ scenario = ( scenarios.channel_join_with_two_users.scenario, # demonstrate bug https://lab.louiz.org/louiz/biboumi/issues/3291 # First user joins an other channel - send_stanza(""), + send_stanza(""), expect_stanza("/message"), expect_stanza("/presence/muc_user:x/muc_user:status[@code='110']"), expect_stanza("/message[@type='groupchat']/subject"), # Second user joins - send_stanza(""), + send_stanza(""), expect_unordered( ["/presence[@to='{jid_one}/{resource_one}']/muc_user:x/muc_user:item[@affiliation='none'][@role='participant']"], [ -- cgit v1.2.3