summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2020-03-10 23:12:10 +0100
committerlouiz’ <louiz@louiz.org>2020-03-10 23:12:10 +0100
commit49a3931784d4b58e1f618f5424701ae6de79833b (patch)
tree571669e59e5e460675fbae2783c6807173a9ec8d
parentfd98e60a1da39999248abb3d864ff12931736ac9 (diff)
downloadbiboumi-49a3931784d4b58e1f618f5424701ae6de79833b.tar.gz
biboumi-49a3931784d4b58e1f618f5424701ae6de79833b.tar.bz2
biboumi-49a3931784d4b58e1f618f5424701ae6de79833b.tar.xz
biboumi-49a3931784d4b58e1f618f5424701ae6de79833b.zip
Add a test to check that XEP-45 stable ID thing is respected
See https://xmpp.org/extensions/xep-0045.html#message
-rw-r--r--tests/end_to_end/scenarios/channel_messages.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/end_to_end/scenarios/channel_messages.py b/tests/end_to_end/scenarios/channel_messages.py
index 8ea979c..34228fe 100644
--- a/tests/end_to_end/scenarios/channel_messages.py
+++ b/tests/end_to_end/scenarios/channel_messages.py
@@ -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]"
]
),