summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2020-03-24 22:18:41 +0100
committerlouiz’ <louiz@louiz.org>2020-05-05 21:10:46 +0200
commit1b72faef3c487232e519a3366db716f5a7e9226a (patch)
treeac1ebd0dbbfc92986d58ed9cc66bd4a045ff1000 /tests
parent81fb7389ae61c000630ddce505cffca2c2ec8b3a (diff)
downloadbiboumi-1b72faef3c487232e519a3366db716f5a7e9226a.tar.gz
biboumi-1b72faef3c487232e519a3366db716f5a7e9226a.tar.bz2
biboumi-1b72faef3c487232e519a3366db716f5a7e9226a.tar.xz
biboumi-1b72faef3c487232e519a3366db716f5a7e9226a.zip
Update the tests to work with oragono
Diffstat (limited to 'tests')
-rw-r--r--tests/end_to_end/scenarios/channel_join_on_fixed_irc_server.py1
-rw-r--r--tests/end_to_end/scenarios/channel_join_with_password.py2
-rw-r--r--tests/end_to_end/scenarios/channel_list_escaping.py1
-rw-r--r--tests/end_to_end/scenarios/channel_list_with_rsm.py46
-rw-r--r--tests/end_to_end/scenarios/channel_messages.py1
-rw-r--r--tests/end_to_end/scenarios/complete_channel_list_with_pages_of_3.py49
-rw-r--r--tests/end_to_end/scenarios/default_channel_list_limit.py10
-rw-r--r--tests/end_to_end/scenarios/default_mam_limit.py1
-rw-r--r--tests/end_to_end/scenarios/encoded_channel_join.py1
-rw-r--r--tests/end_to_end/scenarios/get_irc_connection_info.py4
-rw-r--r--tests/end_to_end/scenarios/get_irc_connection_info_fixed.py1
-rw-r--r--tests/end_to_end/scenarios/invite_other.py2
-rw-r--r--tests/end_to_end/scenarios/irc_server_presence_in_roster.py1
-rw-r--r--tests/end_to_end/scenarios/irc_tls_connection.py1
-rw-r--r--tests/end_to_end/scenarios/join_history_limit.py7
-rw-r--r--tests/end_to_end/scenarios/leave_unjoined_chan.py6
-rw-r--r--tests/end_to_end/scenarios/mode_change.py10
-rw-r--r--tests/end_to_end/scenarios/muc_disco_info.py1
-rw-r--r--tests/end_to_end/scenarios/multisession_kick.py14
-rw-r--r--tests/end_to_end/scenarios/multisessionnick.py4
-rw-r--r--tests/end_to_end/scenarios/nick_change_in_join.py1
-rw-r--r--tests/end_to_end/scenarios/raw_message.py1
-rw-r--r--tests/end_to_end/scenarios/raw_message_fixed_irc_server.py1
-rw-r--r--tests/end_to_end/scenarios/resource_is_removed_from_server_when_last_chan_is_left.py2
-rw-r--r--tests/end_to_end/scenarios/simple_channel_join.py3
-rw-r--r--tests/end_to_end/scenarios/simple_channel_join_fixed.py1
-rw-r--r--tests/end_to_end/scenarios/simple_kick.py1
27 files changed, 67 insertions, 106 deletions
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 40f53b8..7d675ac 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
@@ -6,7 +6,6 @@ scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo@{biboumi_host}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
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']",
"/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#foo@{biboumi_host}'][@type='groupchat']/subject[not(text())]"),
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 b52a06a..fdebcbe 100644
--- a/tests/end_to_end/scenarios/channel_join_with_password.py
+++ b/tests/end_to_end/scenarios/channel_join_with_password.py
@@ -12,7 +12,7 @@ scenario = (
# Second user tries to join, without a password (error ensues)
send_stanza("<presence from='{jid_two}/{resource_one}' to='#foo%{irc_server_one}/{nick_two}'><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
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("/message/body[text()='{irc_host_one}: #foo: Cannot join channel (+k)']"),
expect_stanza("/presence[@type='error'][@from='#foo%{irc_server_one}/{nick_two}']/error[@type='auth']/stanza:not-authorized"),
# Second user joins, with the correct password (success)
diff --git a/tests/end_to_end/scenarios/channel_list_escaping.py b/tests/end_to_end/scenarios/channel_list_escaping.py
index 96e0758..7229e97 100644
--- a/tests/end_to_end/scenarios/channel_list_escaping.py
+++ b/tests/end_to_end/scenarios/channel_list_escaping.py
@@ -3,7 +3,6 @@ from scenarios import *
scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#true\\2ffalse%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
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']",
"/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#true\\2ffalse%{irc_server_one}'][@type='groupchat']/subject[not(text())]"),
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 5455c42..aaf589a 100644
--- a/tests/end_to_end/scenarios/channel_list_with_rsm.py
+++ b/tests/end_to_end/scenarios/channel_list_with_rsm.py
@@ -4,12 +4,10 @@ scenario = (
scenarios.simple_channel_join.scenario,
send_stanza("<presence from='{jid_one}/{resource_one}' to='#bar%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- 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("<presence from='{jid_one}/{resource_one}' to='#coucou%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- 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())]"),
@@ -24,44 +22,46 @@ scenario = (
# it sends us the 2 items
send_stanza("<iq from='{jid_one}/{resource_one}' id='id1' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><max>2</max></set></query></iq>"),
expect_stanza("/iq[@type='result']/disco_items:query",
- "/iq/disco_items:query/disco_items:item[@jid='#bar%{irc_server_one}']",
- "/iq/disco_items:query/disco_items:item[@jid='#coucou%{irc_server_one}']",
- "/iq/disco_items:query/rsm:set/rsm:first[text()='#bar%{irc_server_one}'][@index='0']",
- "/iq/disco_items:query/rsm:set/rsm:last[text()='#coucou%{irc_server_one}']"),
+ "count(/iq/disco_items:query/disco_items:item[@jid])=2",
+ "/iq/disco_items:query/rsm:set/rsm:first[@index='0']",
+ "/iq/disco_items:query/rsm:set/rsm:last",
+ "!/iq/disco_items:query/rsm:set/rsm:count"),
# Ask for 12 (of 3) items. We get the whole list, and thus we have the count included.
send_stanza("<iq from='{jid_one}/{resource_one}' id='id1' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><max>12</max></set></query></iq>"),
expect_stanza("/iq[@type='result']/disco_items:query",
- "/iq/disco_items:query/disco_items:item[@jid='#bar%{irc_server_one}']",
- "/iq/disco_items:query/disco_items:item[@jid='#coucou%{irc_server_one}']",
- "/iq/disco_items:query/disco_items:item[@jid='#foo%{irc_server_one}']",
- "/iq/disco_items:query/rsm:set/rsm:first[text()='#bar%{irc_server_one}'][@index='0']",
- "/iq/disco_items:query/rsm:set/rsm:last[text()='#foo%{irc_server_one}']",
- "/iq/disco_items:query/rsm:set/rsm:count[text()='3']"),
+ "count(/iq/disco_items:query/disco_items:item[@jid])=3",
+ "/iq/disco_items:query/rsm:set/rsm:first[@index='0']",
+ "/iq/disco_items:query/rsm:set/rsm:last",
+ "/iq/disco_items:query/rsm:set/rsm:count[text()='3']",
+ after = save_value("first", lambda stanza: extract_text("/iq/disco_items:query/rsm:set/rsm:first", stanza))),
# Ask for 1 item, AFTER the first item (so,
# the second). Since we don’t invalidate the cache
# with this request, we should have the count
# included.
- send_stanza("<iq from='{jid_one}/{resource_one}' id='id1' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><after>#bar%{irc_server_one}</after><max>1</max></set></query></iq>"),
+ send_stanza("<iq from='{jid_one}/{resource_one}' id='id1' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><after>{first}</after><max>1</max></set></query></iq>"),
expect_stanza("/iq[@type='result']/disco_items:query",
- "/iq/disco_items:query/disco_items:item[@jid='#coucou%{irc_server_one}']",
- "/iq/disco_items:query/rsm:set/rsm:first[text()='#coucou%{irc_server_one}'][@index='1']",
- "/iq/disco_items:query/rsm:set/rsm:last[text()='#coucou%{irc_server_one}']",
- "/iq/disco_items:query/rsm:set/rsm:count[text()='3']"),
+ "count(/iq/disco_items:query/disco_items:item)=1",
+ "/iq/disco_items:query/rsm:set/rsm:first[@index='1']",
+ "/iq/disco_items:query/rsm:set/rsm:last",
+ "/iq/disco_items:query/rsm:set/rsm:count[text()='3']",
+ after = save_value("second", lambda stanza: extract_text("/iq/disco_items:query/rsm:set/rsm:first", stanza))),
# Ask for 1 item, AFTER the second item (so,
# the third).
- send_stanza("<iq from='{jid_one}/{resource_one}' id='id1' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><after>#coucou%{irc_server_one}</after><max>1</max></set></query></iq>"),
+ send_stanza("<iq from='{jid_one}/{resource_one}' id='id1' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><after>{second}</after><max>1</max></set></query></iq>"),
expect_stanza("/iq[@type='result']/disco_items:query",
- "/iq/disco_items:query/disco_items:item[@jid='#foo%{irc_server_one}']",
- "/iq/disco_items:query/rsm:set/rsm:first[text()='#foo%{irc_server_one}'][@index='2']",
- "/iq/disco_items:query/rsm:set/rsm:last[text()='#foo%{irc_server_one}']",
- "/iq/disco_items:query/rsm:set/rsm:count[text()='3']"),
+ "count(/iq/disco_items:query/disco_items:item)=1",
+ "/iq/disco_items:query/rsm:set/rsm:first[@index='2']",
+ "/iq/disco_items:query/rsm:set/rsm:last",
+ "/iq/disco_items:query/rsm:set/rsm:count[text()='3']",
+ after = save_value("third", lambda stanza: extract_text("/iq/disco_items:query/rsm:set/rsm:first", stanza))),
# Ask for 1 item, AFTER the third item (so,
# the fourth). Since it doesn't exist, we get 0 item
- send_stanza("<iq from='{jid_one}/{resource_one}' id='id1' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><after>#foo%{irc_server_one}</after><max>1</max></set></query></iq>"),
+ send_stanza("<iq from='{jid_one}/{resource_one}' id='id1' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><after>{third}</after><max>1</max></set></query></iq>"),
expect_stanza("/iq[@type='result']/disco_items:query",
+ "count(/iq/disco_items:query/disco_items:item)=0",
"/iq/disco_items:query/rsm:set/rsm:count[text()='3']"),
)
diff --git a/tests/end_to_end/scenarios/channel_messages.py b/tests/end_to_end/scenarios/channel_messages.py
index e321114..09ac1ae 100644
--- a/tests/end_to_end/scenarios/channel_messages.py
+++ b/tests/end_to_end/scenarios/channel_messages.py
@@ -46,7 +46,6 @@ scenario = (
# Do the exact same thing, from a different chan,
# to check if the response comes from the right JID
send_stanza("<presence from='{jid_one}/{resource_one}' to='#dummy%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- 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"),
# Send a private message, to a in-room JID
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 9971ccd..4c7e795 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
@@ -3,84 +3,71 @@ from scenarios import *
scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#aaa%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
sequences.connection("irc.localhost", '{jid_one}/{resource_one}'),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
send_stanza("<presence from='{jid_one}/{resource_one}' to='#bbb%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
send_stanza("<presence from='{jid_one}/{resource_one}' to='#ccc%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
send_stanza("<presence from='{jid_one}/{resource_one}' to='#ddd%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
send_stanza("<presence from='{jid_one}/{resource_one}' to='#eee%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
send_stanza("<presence from='{jid_one}/{resource_one}' to='#fff%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
send_stanza("<presence from='{jid_one}/{resource_one}' to='#ggg%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
send_stanza("<presence from='{jid_one}/{resource_one}' to='#hhh%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
send_stanza("<presence from='{jid_one}/{resource_one}' to='#iii%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
send_stanza("<presence from='{jid_one}/{resource_one}' to='#jjj%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
send_stanza("<iq from='{jid_one}/{resource_one}' id='id' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><max>3</max></set></query></iq>"),
expect_stanza("/iq[@type='result']/disco_items:query",
- "/iq/disco_items:query/disco_items:item[@jid='#aaa%{irc_server_one}']",
- "/iq/disco_items:query/disco_items:item[@jid='#bbb%{irc_server_one}']",
- "/iq/disco_items:query/disco_items:item[@jid='#ccc%{irc_server_one}']",
- "/iq/disco_items:query/rsm:set/rsm:first[text()='#aaa%{irc_server_one}'][@index='0']",
- "/iq/disco_items:query/rsm:set/rsm:last[text()='#ccc%{irc_server_one}']"),
+ "count(/iq/disco_items:query/disco_items:item[@jid])=3",
+ "/iq/disco_items:query/rsm:set/rsm:first[@index='0']",
+ "/iq/disco_items:query/rsm:set/rsm:last",
+ after = save_value("last", lambda stanza: extract_text("/iq/disco_items:query/rsm:set/rsm:last", stanza))),
- send_stanza("<iq from='{jid_one}/{resource_one}' id='id' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><after>#ccc%{irc_server_one}</after><max>3</max></set></query></iq>"),
+ send_stanza("<iq from='{jid_one}/{resource_one}' id='id' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><after>{last}</after><max>3</max></set></query></iq>"),
expect_stanza("/iq[@type='result']/disco_items:query",
- "/iq/disco_items:query/disco_items:item[@jid='#ddd%{irc_server_one}']",
- "/iq/disco_items:query/disco_items:item[@jid='#eee%{irc_server_one}']",
- "/iq/disco_items:query/disco_items:item[@jid='#fff%{irc_server_one}']",
- "/iq/disco_items:query/rsm:set/rsm:first[text()='#ddd%{irc_server_one}'][@index='3']",
- "/iq/disco_items:query/rsm:set/rsm:last[text()='#fff%{irc_server_one}']"),
+ "count(/iq/disco_items:query/disco_items:item[@jid])=3",
+ "/iq/disco_items:query/rsm:set/rsm:first[@index='3']",
+ "/iq/disco_items:query/rsm:set/rsm:last",
+ after = save_value("last", lambda stanza: extract_text("/iq/disco_items:query/rsm:set/rsm:last", stanza))),
- send_stanza("<iq from='{jid_one}/{resource_one}' id='id' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><after>#fff%{irc_server_one}</after><max>3</max></set></query></iq>"),
+ send_stanza("<iq from='{jid_one}/{resource_one}' id='id' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><after>{last}</after><max>3</max></set></query></iq>"),
expect_stanza("/iq[@type='result']/disco_items:query",
- "/iq/disco_items:query/disco_items:item[@jid='#ggg%{irc_server_one}']",
- "/iq/disco_items:query/disco_items:item[@jid='#hhh%{irc_server_one}']",
- "/iq/disco_items:query/disco_items:item[@jid='#iii%{irc_server_one}']",
- "/iq/disco_items:query/rsm:set/rsm:first[text()='#ggg%{irc_server_one}'][@index='6']",
- "/iq/disco_items:query/rsm:set/rsm:last[text()='#iii%{irc_server_one}']"),
+ "count(/iq/disco_items:query/disco_items:item[@jid])=3",
+ "/iq/disco_items:query/rsm:set/rsm:first[@index='6']",
+ "/iq/disco_items:query/rsm:set/rsm:last",
+ after = save_value("last", lambda stanza: extract_text("/iq/disco_items:query/rsm:set/rsm:last", stanza))),
- send_stanza("<iq from='{jid_one}/{resource_one}' id='id' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><after>#iii%{irc_server_one}</after><max>3</max></set></query></iq>"),
+ send_stanza("<iq from='{jid_one}/{resource_one}' id='id' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'><set xmlns='http://jabber.org/protocol/rsm'><after>{last}</after><max>3</max></set></query></iq>"),
expect_stanza("/iq[@type='result']/disco_items:query",
- "/iq/disco_items:query/disco_items:item[@jid='#jjj%{irc_server_one}']",
- "/iq/disco_items:query/rsm:set/rsm:first[text()='#jjj%{irc_server_one}'][@index='9']",
- "/iq/disco_items:query/rsm:set/rsm:last[text()='#jjj%{irc_server_one}']",
+ "count(/iq/disco_items:query/disco_items:item[@jid])=1",
+ "/iq/disco_items:query/rsm:set/rsm:first[@index='9']",
+ "/iq/disco_items:query/rsm:set/rsm:last",
"/iq/disco_items:query/rsm:set/rsm:count[text()='10']"),
send_stanza("<presence from='{jid_one}/{resource_one}' to='#aaa%{irc_server_one}/{nick_one}' type='unavailable' />"),
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 ae9f5b2..6858ea1 100644
--- a/tests/end_to_end/scenarios/default_channel_list_limit.py
+++ b/tests/end_to_end/scenarios/default_channel_list_limit.py
@@ -34,19 +34,11 @@ scenario = (
(
send_stanza("<presence from='{jid_one}/{resource_one}' to='#{counter}%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence",
after = save_value("counter", counter)),
expect_stanza("/message"),
) * 110,
send_stanza("<iq from='{jid_one}/{resource_one}' id='id1' to='{irc_server_one}' type='get'><query xmlns='http://jabber.org/protocol/disco#items'/></iq>"),
- # charybdis sends the list in alphabetic order, so #foo is the last, and #99 is after #120
- expect_stanza("/iq/disco_items:query/disco_items:item[@jid='#0%{irc_server_one}']",
- "/iq/disco_items:query/disco_items:item[@jid='#1%{irc_server_one}']",
- "/iq/disco_items:query/disco_items:item[@jid='#109%{irc_server_one}']",
- "/iq/disco_items:query/disco_items:item[@jid='#9%{irc_server_one}']",
- "!/iq/disco_items:query/disco_items:item[@jid='#foo%{irc_server_one}']",
- "!/iq/disco_items:query/disco_items:item[@jid='#99%{irc_server_one}']",
- "!/iq/disco_items:query/disco_items:item[@jid='#90%{irc_server_one}']"),
+ expect_stanza("count(/iq/disco_items:query/disco_items:item[@jid])=100")
)
diff --git a/tests/end_to_end/scenarios/default_mam_limit.py b/tests/end_to_end/scenarios/default_mam_limit.py
index 2363b15..0f402f8 100644
--- a/tests/end_to_end/scenarios/default_mam_limit.py
+++ b/tests/end_to_end/scenarios/default_mam_limit.py
@@ -16,7 +16,6 @@ scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
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']",
"/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]",
diff --git a/tests/end_to_end/scenarios/encoded_channel_join.py b/tests/end_to_end/scenarios/encoded_channel_join.py
index 2903d9a..71fa09f 100644
--- a/tests/end_to_end/scenarios/encoded_channel_join.py
+++ b/tests/end_to_end/scenarios/encoded_channel_join.py
@@ -3,7 +3,6 @@ from scenarios import *
scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#biboumi\\40louiz.org\\3a80%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
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']",
"/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#biboumi\\40louiz.org\\3a80%{irc_server_one}'][@type='groupchat']/subject[not(text())]"),
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 3846487..7695aa1 100644
--- a/tests/end_to_end/scenarios/get_irc_connection_info.py
+++ b/tests/end_to_end/scenarios/get_irc_connection_info.py
@@ -6,9 +6,7 @@ scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
sequences.connection("irc.localhost", '{jid_one}/{resource_one}'),
- expect_stanza("/message"),
- expect_stanza("/presence"),
- expect_stanza("/message"),
+ simple_channel_join.expect_self_join_presence(),
send_stanza("<iq type='set' id='command2' from='{jid_one}/{resource_one}' to='{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='get-irc-connection-info' action='execute' /></iq>"),
expect_stanza(r"/iq/commands:command/commands:note[re:test(text(), 'Connected to IRC server irc.localhost on port 6667 since \d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d \(\d+ seconds ago\)\.\n#foo from 1 resource: {resource_one}.*')]"),
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 dbdbe4f..922ea6a 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
@@ -8,7 +8,6 @@ scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo@{biboumi_host}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
sequences.connection("irc.localhost", '{jid_one}/{resource_one}', fixed_irc_server=True),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
diff --git a/tests/end_to_end/scenarios/invite_other.py b/tests/end_to_end/scenarios/invite_other.py
index dd83684..0e40dcb 100644
--- a/tests/end_to_end/scenarios/invite_other.py
+++ b/tests/end_to_end/scenarios/invite_other.py
@@ -3,13 +3,11 @@ from scenarios import *
scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
sequences.connection("irc.localhost", '{jid_one}/{resource_one}'),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
send_stanza("<presence from='{jid_two}/{resource_two}' to='#bar%{irc_server_one}/{nick_two}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
sequences.connection("irc.localhost", '{jid_two}/{resource_two}'),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
send_stanza("<message from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}'><x xmlns='http://jabber.org/protocol/muc#user'><invite to='{nick_two}'/></x></message>"),
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 bd6d26e..24c1b60 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
@@ -13,7 +13,6 @@ scenario = (
# We must receive the IRC server presence, in the connection sequence
sequences.connection("irc.localhost", '{jid_one}/{resource_one}', expected_irc_presence=True),
- 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']",
"/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]"),
diff --git a/tests/end_to_end/scenarios/irc_tls_connection.py b/tests/end_to_end/scenarios/irc_tls_connection.py
index ce11877..db5d32e 100644
--- a/tests/end_to_end/scenarios/irc_tls_connection.py
+++ b/tests/end_to_end/scenarios/irc_tls_connection.py
@@ -18,7 +18,6 @@ scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
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']",
"/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]"),
diff --git a/tests/end_to_end/scenarios/join_history_limit.py b/tests/end_to_end/scenarios/join_history_limit.py
index 94f9579..216e2a0 100644
--- a/tests/end_to_end/scenarios/join_history_limit.py
+++ b/tests/end_to_end/scenarios/join_history_limit.py
@@ -17,7 +17,6 @@ scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
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']",
"/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]"),
@@ -42,7 +41,6 @@ scenario = (
# join some other channel, to stay connected to the server even after leaving #foo
send_stanza("<presence from='{jid_one}/{resource_one}' to='#DUMMY%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message/subject"),
@@ -54,7 +52,6 @@ scenario = (
# Rejoin #foo, with some history limit
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}'><x xmlns='http://jabber.org/protocol/muc'><history maxchars='0'/></x></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message/subject"),
@@ -65,7 +62,6 @@ scenario = (
# Rejoin #foo, with some history limit
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}'><x xmlns='http://jabber.org/protocol/muc'><history maxstanzas='3'/></x></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/body[text()='coucou 2']"),
expect_stanza("/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/body[text()='coucou 3']"),
@@ -77,7 +73,6 @@ scenario = (
# Rejoin #foo, with some history limit
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}'><x xmlns='http://jabber.org/protocol/muc'><history since='{first_timestamp}'/></x></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/body[text()='coucou 3']"),
expect_stanza("/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/body[text()='coucou 4']"),
@@ -87,7 +82,6 @@ scenario = (
# Rejoin #foo, with some history limit
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}'><x xmlns='http://jabber.org/protocol/muc'><history seconds='1'/></x></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/body[text()='coucou 3']"),
expect_stanza("/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/body[text()='coucou 4']"),
@@ -97,7 +91,6 @@ scenario = (
# Rejoin #foo, with some history limit
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}'><x xmlns='http://jabber.org/protocol/muc'><history seconds='5'/></x></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/body[text()='coucou']"), expect_stanza("/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/body[text()='coucou 2']"),
expect_stanza("/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/body[text()='coucou 3']"),
diff --git a/tests/end_to_end/scenarios/leave_unjoined_chan.py b/tests/end_to_end/scenarios/leave_unjoined_chan.py
index 445480b..aeb6f55 100644
--- a/tests/end_to_end/scenarios/leave_unjoined_chan.py
+++ b/tests/end_to_end/scenarios/leave_unjoined_chan.py
@@ -3,14 +3,12 @@ from scenarios import *
scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
sequences.connection("irc.localhost", '{jid_one}/{resource_one}'),
- expect_stanza("/message"),
- expect_stanza("/presence"),
- expect_stanza("/message"),
+ simple_channel_join.expect_self_join_presence(),
send_stanza("<presence from='{jid_two}/{resource_two}' to='#foo%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
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.']"),
+ expect_stanza("/message[@to='{jid_two}/{resource_two}'][@type='chat']/body[text()='irc.localhost: {nick_one}: Nickname is already in use']"),
expect_stanza("/presence[@type='error']/error[@type='cancel'][@code='409']/stanza:conflict"),
send_stanza("<presence from='{jid_two}/{resource_two}' to='#foo%{irc_server_one}/{nick_one}' type='unavailable' />")
)
diff --git a/tests/end_to_end/scenarios/mode_change.py b/tests/end_to_end/scenarios/mode_change.py
index 4cbf036..b45904b 100644
--- a/tests/end_to_end/scenarios/mode_change.py
+++ b/tests/end_to_end/scenarios/mode_change.py
@@ -22,6 +22,16 @@ scenario = (
["/iq[@id='id1'][@type='result'][@to='{jid_one}/{resource_one}'][@from='#foo%{irc_server_one}']"],
),
+ # Remove +v manually. User ONLY has +o now. This doesn’t change the role/affiliation
+ send_stanza("<message from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}' type='groupchat'><body>/mode -v {nick_two}</body></message>"),
+ expect_unordered(
+ ["/message[@to='{jid_one}/{resource_one}']/body[text()='Mode #foo [-v {nick_two}] by {nick_one}']"],
+ ["/message[@to='{jid_two}/{resource_one}']/body[text()='Mode #foo [-v {nick_two}] by {nick_one}']"],
+ ["/presence[@to='{jid_two}/{resource_one}'][@from='#foo%{irc_server_one}/{nick_two}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']"],
+ ["/presence[@to='{jid_one}/{resource_one}'][@from='#foo%{irc_server_one}/{nick_two}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']"],
+ ),
+
+
# remove the mode
send_stanza("<iq from='{jid_one}/{resource_one}' id='id1' to='#foo%{irc_server_one}' type='set'><query xmlns='http://jabber.org/protocol/muc#admin'><item affiliation='member' nick='{nick_two}' role='participant'/></query></iq>"),
expect_unordered(
diff --git a/tests/end_to_end/scenarios/muc_disco_info.py b/tests/end_to_end/scenarios/muc_disco_info.py
index 36fdbc6..9b6f0e5 100644
--- a/tests/end_to_end/scenarios/muc_disco_info.py
+++ b/tests/end_to_end/scenarios/muc_disco_info.py
@@ -16,7 +16,6 @@ scenario = (
# Join the channel, and re-do the same query
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
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']",
"/presence/muc_user:x/muc_user:status[@code='110']"),
diff --git a/tests/end_to_end/scenarios/multisession_kick.py b/tests/end_to_end/scenarios/multisession_kick.py
index 4f0627e..580beb4 100644
--- a/tests/end_to_end/scenarios/multisession_kick.py
+++ b/tests/end_to_end/scenarios/multisession_kick.py
@@ -7,16 +7,18 @@ scenario = (
send_stanza("<presence from='{jid_two}/{resource_one}' to='#foo%{irc_server_one}/{nick_two}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
sequences.connection("irc.localhost", '{jid_two}/{resource_one}'),
expect_unordered(
- ["/presence/muc_user:x/muc_user:item[@affiliation='none'][@role='participant']"],
- ["/presence/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']"],
- ["/presence/muc_user:x/muc_user:status[@code='110']"],
+ ["/presence[@to='{jid_one}/{resource_one}']/muc_user:x/muc_user:item[@affiliation='none'][@role='participant']"],
+ ["/presence[@to='{jid_two}/{resource_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']"],
+ ["/presence[@to='{jid_two}/{resource_one}']/muc_user:x/muc_user:item[@affiliation='none'][@role='participant']",
+ "/presence[@to='{jid_two}/{resource_one}']/muc_user:x/muc_user:status[@code='110']"],
["/message/subject"]
),
# Second resource
send_stanza("<presence from='{jid_two}/{resource_two}' to='#foo%{irc_server_one}/{nick_two}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- 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']"
+ expect_unordered(
+ ["/presence[@to='{jid_two}/{resource_two}'][@from='#foo%{irc_server_one}/{nick_one}']"],
+ ["/presence[@to='{jid_two}/{resource_two}'][@from='#foo%{irc_server_one}/{nick_two}']",
+ "/presence/muc_user:x/muc_user:status[@code='110']"]
),
expect_stanza("/message[@from='#foo%{irc_server_one}'][@type='groupchat'][@to='{jid_two}/{resource_two}']/subject[not(text())]"),
diff --git a/tests/end_to_end/scenarios/multisessionnick.py b/tests/end_to_end/scenarios/multisessionnick.py
index 761e66e..2fd84f9 100644
--- a/tests/end_to_end/scenarios/multisessionnick.py
+++ b/tests/end_to_end/scenarios/multisessionnick.py
@@ -70,8 +70,8 @@ scenario = (
# First occupant (with the two resources) changes her/his nick to a conflicting one
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_two}' />"),
expect_unordered(
- ["/message[@to='{jid_one}/{resource_one}'][@type='chat']/body[text()='irc.localhost: Nick2: Nickname is already in use.']"],
- ["/message[@to='{jid_one}/{resource_two}'][@type='chat']/body[text()='irc.localhost: Nick2: Nickname is already in use.']"],
+ ["/message[@to='{jid_one}/{resource_one}'][@type='chat']/body[text()='irc.localhost: Nick2: Nickname is already in use']"],
+ ["/message[@to='{jid_one}/{resource_two}'][@type='chat']/body[text()='irc.localhost: Nick2: Nickname is already in use']"],
["/presence[@to='{jid_one}/{resource_one}'][@from='#foo%{irc_server_one}/{nick_two}'][@type='error']"],
["/presence[@to='{jid_one}/{resource_two}'][@from='#foo%{irc_server_one}/{nick_two}'][@type='error']"]
),
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 baabb2e..f4feae3 100644
--- a/tests/end_to_end/scenarios/nick_change_in_join.py
+++ b/tests/end_to_end/scenarios/nick_change_in_join.py
@@ -8,7 +8,6 @@ scenario = (
expect_self_join_presence(jid = '{jid_one}/{resource_one}', chan = "#foo", nick = "{nick_one}"),
send_stanza("<presence from='{jid_one}/{resource_one}' to='#bar%{irc_server_one}/{nick_two}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- 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']",
"/presence/muc_user:x/muc_user:status[@code='210']", # This status signals that the server forced our nick to NOT be the one we asked
diff --git a/tests/end_to_end/scenarios/raw_message.py b/tests/end_to_end/scenarios/raw_message.py
index ddacdbe..c6cd4e7 100644
--- a/tests/end_to_end/scenarios/raw_message.py
+++ b/tests/end_to_end/scenarios/raw_message.py
@@ -3,7 +3,6 @@ from scenarios import *
scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
sequences.connection("irc.localhost", '{jid_one}/{resource_one}'),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
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 b8858a5..7eb5b13 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
@@ -5,7 +5,6 @@ conf = 'fixed_server'
scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
sequences.connection("irc.localhost", '{jid_one}/{resource_one}', fixed_irc_server=True),
- expect_stanza("/message"),
expect_stanza("/presence"),
expect_stanza("/message"),
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 f1ad137..dfb7161 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
@@ -4,7 +4,6 @@ scenario = (
# Join the channel
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
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']",
"/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#foo%{irc_server_one}'][@type='groupchat'][@to='{jid_one}/{resource_one}']/subject[not(text())]"),
@@ -27,7 +26,6 @@ scenario = (
# Join some other channel with someone else
send_stanza("<presence from='{jid_two}/{resource_one}' to='#bar%{irc_server_one}/{nick_two}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
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']",
"/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#bar%{irc_server_one}'][@type='groupchat'][@to='{jid_two}/{resource_one}']/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 cb41ca1..9beba3b 100644
--- a/tests/end_to_end/scenarios/simple_channel_join.py
+++ b/tests/end_to_end/scenarios/simple_channel_join.py
@@ -1,8 +1,7 @@
from scenarios import *
-def expect_self_join_presence(jid, chan, nick, irc_server="{irc_server_one}"):
+def expect_self_join_presence(jid='{jid_one}/{resource_one}', chan='#foo', nick='{nick_one}', irc_server="{irc_server_one}"):
return (
- expect_stanza("/message/body[text()='Mode " + chan + " [+nt] by irc.localhost']"),
expect_stanza("/presence[@to='" + jid +"'][@from='" + chan + "%" + irc_server + "/" + nick + "']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']",
"/presence/muc_user:x/muc_user:status[@code='100']", # Rooms are all non-anonymous
"/presence/muc_user:x/muc_user:status[@code='110']",
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 87816c3..9f5b835 100644
--- a/tests/end_to_end/scenarios/simple_channel_join_fixed.py
+++ b/tests/end_to_end/scenarios/simple_channel_join_fixed.py
@@ -5,7 +5,6 @@ conf = "fixed_server"
scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo@{biboumi_host}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
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']",
"/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#foo@{biboumi_host}'][@type='groupchat']/subject[not(text())]"),
diff --git a/tests/end_to_end/scenarios/simple_kick.py b/tests/end_to_end/scenarios/simple_kick.py
index 20d56b0..2949157 100644
--- a/tests/end_to_end/scenarios/simple_kick.py
+++ b/tests/end_to_end/scenarios/simple_kick.py
@@ -5,7 +5,6 @@ scenario = (
# demonstrate bug https://lab.louiz.org/louiz/biboumi/issues/3291
# First user joins an other channel
send_stanza("<presence from='{jid_one}/{resource_one}' to='#bar%{irc_server_one}/{nick_one}' ><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
- expect_stanza("/message"),
expect_stanza("/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@type='groupchat']/subject"),