diff options
author | louiz’ <louiz@louiz.org> | 2016-10-02 12:56:04 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-10-02 12:57:04 +0200 |
commit | ffad4306b9e9c6065a01a5fcaca668d70af0db8a (patch) | |
tree | c17aae7fd109c91785829224ef7a32c12ff923cc /tests/end_to_end | |
parent | 265b5df61b5f3d4b5f30bbc6518f833f73bda1ff (diff) | |
download | biboumi-ffad4306b9e9c6065a01a5fcaca668d70af0db8a.tar.gz biboumi-ffad4306b9e9c6065a01a5fcaca668d70af0db8a.tar.bz2 biboumi-ffad4306b9e9c6065a01a5fcaca668d70af0db8a.tar.xz biboumi-ffad4306b9e9c6065a01a5fcaca668d70af0db8a.zip |
Use LIST * instead of just LIST, because some servers don’t accept it
Also add a e2e test for the list query
Diffstat (limited to 'tests/end_to_end')
-rw-r--r-- | tests/end_to_end/__main__.py | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py index a893935..d498ba7 100644 --- a/tests/end_to_end/__main__.py +++ b/tests/end_to_end/__main__.py @@ -1212,7 +1212,39 @@ if __name__ == '__main__': "/message/delay:delay[@from='#foo%{irc_server_one}']")), partial(expect_stanza, "/message[@from='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]"), - ]) + ]), + Scenario("simple_channel_list", + [ + handshake_sequence(), + + partial(log_message, "Join first channel #foo"), + partial(send_stanza, + "<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"), + 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(log_message, "Join second channel #bar"), + partial(send_stanza, + "<presence from='{jid_one}/{resource_one}' to='#bar%{irc_server_one}/{nick_one}' />"), + partial(expect_stanza, + "/message/body[text()='Mode #bar [+nt] by {irc_host_one}']"), + partial(expect_stanza, "/presence"), + partial(expect_stanza, "/message[@from='#bar%{irc_server_one}'][@type='groupchat']/subject[not(text())]"), + + partial(log_message, "Request the whole channel list"), + partial(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>"), + partial(expect_stanza, ( + "/iq[@type='result']/disco_items:query", + "/iq/disco_items:query/disco_items:item[@jid='#foo%{irc_server_one}']", + "/iq/disco_items:query/disco_items:item[@jid='#bar%{irc_server_one}']" + )) + ]) ) failures = 0 |