summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2020-03-02 23:17:48 +0100
committerlouiz’ <louiz@louiz.org>2020-03-02 23:20:47 +0100
commit77c134a47b0e794080e424be393d778183fd1f37 (patch)
tree7d3f378dbe0e3ee1277ebb6ce27744b537c215a6
parent3584979cc28d083c2bba70da97623340d232ef6a (diff)
downloadbiboumi-77c134a47b0e794080e424be393d778183fd1f37.tar.gz
biboumi-77c134a47b0e794080e424be393d778183fd1f37.tar.bz2
biboumi-77c134a47b0e794080e424be393d778183fd1f37.tar.xz
biboumi-77c134a47b0e794080e424be393d778183fd1f37.zip
Demonstrate issue #3423 with e2e tests
-rw-r--r--tests/end_to_end/scenarios/channel_force_join.py20
-rw-r--r--tests/end_to_end/scenarios/channel_join_with_different_nick.py6
2 files changed, 6 insertions, 20 deletions
diff --git a/tests/end_to_end/scenarios/channel_force_join.py b/tests/end_to_end/scenarios/channel_force_join.py
index 089da51..9a24c06 100644
--- a/tests/end_to_end/scenarios/channel_force_join.py
+++ b/tests/end_to_end/scenarios/channel_force_join.py
@@ -21,25 +21,5 @@ scenario = (
"/message[@from='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]"
]
),
-
- # And also, that was not the same nickname, so everyone receives a nick change
- expect_unordered(
- [
- "/presence[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_two}/{resource_one}'][@type='unavailable']/muc_user:x/muc_user:item[@nick='Bernard']",
- "/presence/muc_user:x/muc_user:status[@code='303']",
- ],
- [
- "/presence[@from='#foo%{irc_server_one}/{nick_three}'][@to='{jid_two}/{resource_one}']",
- ],
- [
- "/presence[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_one}/{resource_one}'][@type='unavailable']/muc_user:x/muc_user:item[@nick='Bernard']",
- "/presence/muc_user:x/muc_user:status[@code='303']",
- "/presence/muc_user:x/muc_user:status[@code='110']",
- ],
- [
- "/presence[@from='#foo%{irc_server_one}/{nick_three}'][@to='{jid_one}/{resource_one}']",
- "/presence/muc_user:x/muc_user:status[@code='110']",
- ],
- ),
)
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..87ae80c 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
@@ -11,4 +11,10 @@ scenario = (
send_stanza("<presence from='{jid_one}/{resource_one}' to='#bar%{irc_server_one}/{nick_two}' />"),
# 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("<presence from='{jid_one}/{resource_two}' to='#foo%{irc_server_one}/{nick_two}' />"),
+ # 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"),
)