From 51696c091cc7058b05b33f1085b1246f3b5dc59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 19 Apr 2017 23:33:07 +0200 Subject: Make sure the channel is joined before trying to leave it fix #3243 --- tests/end_to_end/__main__.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py index 4ca7ff8..8be5078 100644 --- a/tests/end_to_end/__main__.py +++ b/tests/end_to_end/__main__.py @@ -2457,11 +2457,24 @@ if __name__ == '__main__': handshake_sequence(), partial(send_stanza, ""), partial(expect_stanza, "/presence[@to='{jid_one}'][@from='{biboumi_host}'][@type='subscribed']") - ], conf='fixed_server') - + ], conf='fixed_server'), + Scenario("leave_unjoined_chan", + [ + handshake_sequence(), + partial(send_stanza, ""), + connection_sequence("irc.localhost", '{jid_one}/{resource_one}'), + partial(expect_stanza, "/message"), + partial(expect_stanza, "/presence"), + partial(expect_stanza, "/message"), + + partial(send_stanza, ""), + connection_begin_sequence("irc.localhost", '{jid_two}/{resource_two}'), + partial(expect_stanza, "/message[@to='{jid_two}/{resource_two}'][@type='chat']/body[text()='irc.localhost: {nick_one}: Nickname is already in use.']"), + partial(expect_stanza, "/presence[@type='error']/error[@type='cancel'][@code='409']/stanza:conflict"), + partial(send_stanza, "") + ]) ) - failures = 0 scenar_list = sys.argv[1:] -- cgit v1.2.3