summaryrefslogtreecommitdiff
path: root/tests/end_to_end
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-03-23 21:17:44 +0100
committerlouiz’ <louiz@louiz.org>2018-03-23 21:18:52 +0100
commitd81a9456ac33d7be8e494a6e7af01b45b8fa2478 (patch)
tree0a72eed2af858e91b91bab2ad9921b083e3d9724 /tests/end_to_end
parente2fc3cf68e1dc145e75fe67f2543765ff00ba839 (diff)
downloadbiboumi-d81a9456ac33d7be8e494a6e7af01b45b8fa2478.tar.gz
biboumi-d81a9456ac33d7be8e494a6e7af01b45b8fa2478.tar.bz2
biboumi-d81a9456ac33d7be8e494a6e7af01b45b8fa2478.tar.xz
biboumi-d81a9456ac33d7be8e494a6e7af01b45b8fa2478.zip
Change the nick of the joining user AFTER sending all the join stuff
fix #3305
Diffstat (limited to 'tests/end_to_end')
-rw-r--r--tests/end_to_end/__main__.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py
index 60a9db6..620a2bd 100644
--- a/tests/end_to_end/__main__.py
+++ b/tests/end_to_end/__main__.py
@@ -736,9 +736,9 @@ if __name__ == '__main__':
# Here we simulate a desynchronization of a client: The client thinks it’s
# disconnected from the room, but biboumi still thinks it’s in the room. The
# client thus sends a join presence, and biboumi should send everything
- # (user list, history, etc) in response
+ # (user list, history, etc) in response.
partial(send_stanza,
- "<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}'><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
+ "<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_three}'><x xmlns='http://jabber.org/protocol/muc'/></presence>"),
partial(expect_unordered, [
("/presence[@to='{jid_one}/{resource_one}'][@from='#foo%{irc_server_one}/{nick_two}']/muc_user:x/muc_user:item[@affiliation='none'][@role='participant'][@jid='~bobby@localhost']",),
@@ -746,6 +746,17 @@ if __name__ == '__main__':
"/presence/muc_user:x/muc_user:status[@code='110']",),
("/message[@from='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]",),
]),
+ # And also, that was not the same nickname
+ partial(expect_unordered, [
+ ("/presence[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_two}/{resource_one}'][@type='unavailable']/muc_user:x/muc_user:item[@nick='Bernard']",
+ "/presence/muc_user:x/muc_user:status[@code='303']"),
+ ("/presence[@from='#foo%{irc_server_one}/{nick_three}'][@to='{jid_two}/{resource_one}']",),
+ ("/presence[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_one}/{resource_one}'][@type='unavailable']/muc_user:x/muc_user:item[@nick='Bernard']",
+ "/presence/muc_user:x/muc_user:status[@code='303']",
+ "/presence/muc_user:x/muc_user:status[@code='110']"),
+ ("/presence[@from='#foo%{irc_server_one}/{nick_three}'][@to='{jid_one}/{resource_one}']",
+ "/presence/muc_user:x/muc_user:status[@code='110']"),
+ ]),
]),
Scenario("channel_join_with_password",
[