diff options
author | louiz’ <louiz@louiz.org> | 2017-04-20 00:24:59 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2017-04-20 00:24:59 +0200 |
commit | 727d887d7bc8a17b88402ae63e0569084a24a84d (patch) | |
tree | 2635857343407eec98dfabfc61f502dbd05dbca5 /tests/end_to_end | |
parent | 4bae383c1ddb762308c99f90625e5ecc885146b3 (diff) | |
download | biboumi-727d887d7bc8a17b88402ae63e0569084a24a84d.tar.gz biboumi-727d887d7bc8a17b88402ae63e0569084a24a84d.tar.bz2 biboumi-727d887d7bc8a17b88402ae63e0569084a24a84d.tar.xz biboumi-727d887d7bc8a17b88402ae63e0569084a24a84d.zip |
Fix wrong JID computing when sending iq ping or version in fixed mode
fix #3259
Diffstat (limited to 'tests/end_to_end')
-rw-r--r-- | tests/end_to_end/__main__.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py index 8acfe14..bd25f55 100644 --- a/tests/end_to_end/__main__.py +++ b/tests/end_to_end/__main__.py @@ -1255,6 +1255,31 @@ if __name__ == '__main__': "/iq[@from='#foo%{irc_server_one}/{nick_one}'][@type='result'][@to='{jid_one}/{resource_two}'][@id='third_ping']"), ]), + Scenario("self_ping_fixed_server", [ + handshake_sequence(), + partial(send_stanza, + "<presence from='{jid_one}/{resource_one}' to='#foo@{biboumi_host}/{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@{biboumi_host}/{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@{biboumi_host}'][@type='groupchat']/subject[not(text())]"), + + # Send a ping to ourself + partial(send_stanza, + "<iq type='get' from='{jid_one}/{resource_one}' id='first_ping' to='#foo@{biboumi_host}/{nick_one}'><ping xmlns='urn:xmpp:ping' /></iq>"), + # We receive our own ping request, + partial(expect_stanza, + "/iq[@from='{lower_nick_one}@{biboumi_host}'][@type='get'][@to='{jid_one}/{resource_one}'][@id='gnip_tsrif']"), + # Respond to the request + partial(send_stanza, + "<iq type='result' to='{lower_nick_one}@{biboumi_host}' id='gnip_tsrif' from='{jid_one}/{resource_one}'/>"), + partial(expect_stanza, + "/iq[@from='#foo@{biboumi_host}/{nick_one}'][@type='result'][@to='{jid_one}/{resource_one}'][@id='first_ping']"), + ], conf="fixed_server"), Scenario("simple_kick", [ handshake_sequence(), |