~singpolyma/biboumi

ref: 4ee3dd695eb8f80c019290ccb9c4233f9067d3d0 biboumi/tests/end_to_end/scenarios/nick_change.py -rw-r--r-- 1.6 KiB
4ee3dd69 — louiz’ Demonstrate bug #3429 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from scenarios import *

import scenarios.channel_join_with_two_users

scenario = (
    scenarios.channel_join_with_two_users.scenario,

    # first users changes their nick
    send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_three}' id='nick_change' />"),
    expect_unordered(
        ["/presence[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_two}/{resource_one}'][@type='unavailable']",
         "/presence/muc_user:x/muc_user:status[@code='303']",
         "/presence/muc_user:x/muc_user:item[@affiliation='admin']",
         "/presence/muc_user:x/muc_user:item[@role='moderator']",
         "/presence/muc_user:x/muc_user:item[@nick='{nick_three}']"],

        ["/presence[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_one}/{resource_one}'][@type='unavailable']",
         "/presence/muc_user:x/muc_user:status[@code='303']",
         "/presence/muc_user:x/muc_user:item[@nick='{nick_three}']",
         "/presence/muc_user:x/muc_user:item[@affiliation='admin']",
         "/presence/muc_user:x/muc_user:item[@role='moderator']",
         "/presence/muc_user:x/muc_user:status[@code='110']"],

        ["/presence[@from='#foo%{irc_server_one}/{nick_three}'][@to='{jid_two}/{resource_one}']",
         "/presence/muc_user:x/muc_user:item[@affiliation='admin']",
         "/presence/muc_user:x/muc_user:item[@role='moderator']"],

        ["/presence[@from='#foo%{irc_server_one}/{nick_three}'][@to='{jid_one}/{resource_one}']",
         "/presence/muc_user:x/muc_user:item[@affiliation='admin']",
         "/presence/muc_user:x/muc_user:item[@role='moderator']",
         "/presence/muc_user:x/muc_user:status[@code='110']"]
    ),
)