From 08085d862fc7390eab6d6492040b178801096b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 17 Sep 2018 22:35:59 +0200 Subject: Add a test demonstrating #3378 --- tests/end_to_end/__main__.py | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py index d57f375..cb92cb0 100644 --- a/tests/end_to_end/__main__.py +++ b/tests/end_to_end/__main__.py @@ -655,9 +655,9 @@ if __name__ == '__main__': partial(send_stanza, ""), partial(send_stanza, - ""), + ""), partial(send_stanza, - " SECRET"), + " SECRET"), connection_sequence("irc.localhost", '{jid_one}/{resource_one}'), @@ -685,6 +685,40 @@ if __name__ == '__main__': ), partial(expect_stanza, "/message[@from='#baz%{irc_server_one}'][@type='groupchat']/subject[not(text())]"), ]), + Scenario("nick_change_in_join", + [ + handshake_sequence(), + partial(send_stanza, + ""), + connection_sequence("irc.localhost", '{jid_one}/{resource_one}'), + partial(expect_stanza, + "/message/body[text()='Mode #foo [+nt] by {irc_host_one}']"), + partial(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']") + ), + partial(expect_stanza, "/message[@from='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]"), + + partial(send_stanza, + ""), + partial(expect_stanza, + "/message/body[text()='Mode #bar [+nt] by {irc_host_one}']"), + partial(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']") + ), + partial(expect_stanza, "/message[@from='#bar%{irc_server_one}'][@type='groupchat']/subject[not(text())]"), + + partial(send_stanza, + ""), + partial(expect_stanza, + "/message/body[text()='Mode #boule [+nt] by {irc_host_one}']"), + partial(expect_stanza, + ("/presence[@to='{jid_one}/{resource_one}'][@from='#boule%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']", + "/presence/muc_user:x/muc_user:status[@code='110']") + ), + partial(expect_stanza, "/message[@from='#boule%{irc_server_one}'][@type='groupchat']/subject[not(text())]"), + ]), Scenario("not_connected_error", [ handshake_sequence(), -- cgit v1.2.3