diff options
author | louiz’ <louiz@louiz.org> | 2017-08-24 23:53:29 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2017-08-24 23:54:39 +0200 |
commit | fe4ceb72d09968a16105c4c0864705f474d9a863 (patch) | |
tree | f80d81d191e3274317293196ef74b06ed87ac84b /tests | |
parent | 49c86398a557856fb202c449790d0b4afffb1182 (diff) | |
download | biboumi-fe4ceb72d09968a16105c4c0864705f474d9a863.tar.gz biboumi-fe4ceb72d09968a16105c4c0864705f474d9a863.tar.bz2 biboumi-fe4ceb72d09968a16105c4c0864705f474d9a863.tar.xz biboumi-fe4ceb72d09968a16105c4c0864705f474d9a863.zip |
Add an e2e test to demonstrate bug #3291
Diffstat (limited to 'tests')
-rw-r--r-- | tests/end_to_end/__main__.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py index c6607d0..5317540 100644 --- a/tests/end_to_end/__main__.py +++ b/tests/end_to_end/__main__.py @@ -1480,6 +1480,24 @@ if __name__ == '__main__': ("/message/subject",), ]), + # demonstrate bug https://lab.louiz.org/louiz/biboumi/issues/3291 + # First user joins an other channel + partial(send_stanza, + "<presence from='{jid_one}/{resource_one}' to='#bar%{irc_server_one}/{nick_one}' />"), + partial(expect_stanza, "/message"), + partial(expect_stanza, "/presence/muc_user:x/muc_user:status[@code='110']"), + partial(expect_stanza, "/message[@type='groupchat']/subject"), + + # Second user joins + partial(send_stanza, + "<presence from='{jid_two}/{resource_one}' to='#bar%{irc_server_one}/{nick_two}' />"), + partial(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']",), + ("/message/subject",), + ]), + # Moderator kicks participant partial(send_stanza, "<iq id='kick1' to='#foo%{irc_server_one}' from='{jid_one}/{resource_one}' type='set'><query xmlns='http://jabber.org/protocol/muc#admin'><item nick='{nick_two}' role='none'><reason>reported</reason></item></query></iq>"), @@ -1495,6 +1513,14 @@ if __name__ == '__main__': ), ("/iq[@id='kick1'][@type='result']",), ]), + + # Bug 3291, suite. We must not receive any presence from #foo, here + partial(send_stanza, "<message from='{jid_two}/{resource_one}' to='{irc_server_one}' type='chat'><body>QUIT bye bye</body></message>"), + partial(expect_unordered, + [("/presence[@from='#bar%{irc_server_one}/{nick_two}'][@to='{jid_one}/{resource_one}']",), + ("/presence[@from='#bar%{irc_server_one}/{nick_two}'][@to='{jid_two}/{resource_one}']",), + ("/message",), + ("/message",)]) ]), Scenario("mode_change", [ |