~singpolyma/biboumi

49a3931784d4b58e1f618f5424701ae6de79833b — louiz’ 2 years ago fd98e60
Add a test to check that XEP-45 stable ID thing is respected

See https://xmpp.org/extensions/xep-0045.html#message
1 files changed, 3 insertions(+), 3 deletions(-)

M tests/end_to_end/scenarios/channel_messages.py
M tests/end_to_end/scenarios/channel_messages.py => tests/end_to_end/scenarios/channel_messages.py +3 -3
@@ 21,15 21,15 @@ scenario = (
    ),

    # Send a channel message
    send_stanza("<message from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}' type='groupchat'><body>coucou</body></message>"),
    send_stanza("<message id='first_id' from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}' type='groupchat'><body>coucou</body></message>"),
    # Receive the message, forwarded to the two users
    expect_unordered(
        [
            "/message[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_one}/{resource_one}'][@type='groupchat']/body[text()='coucou']",
            "/message[@id='first_id'][@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_one}/{resource_one}'][@type='groupchat']/body[text()='coucou']",
            "/message/stable_id:stanza-id[@by='#foo%{irc_server_one}'][@id]"
        ],
        [
            "/message[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_two}/{resource_one}'][@type='groupchat']/body[text()='coucou']",
            "/message[@id][@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_two}/{resource_one}'][@type='groupchat']/body[text()='coucou']",
            "/message/stable_id:stanza-id[@by='#foo%{irc_server_one}'][@id]"
        ]
    ),