Don’t reflect an empty id if it was not included

Instead, generate a uuid for that message
This commit is contained in:
louiz’
2018-03-18 19:41:52 +01:00
parent 0de282a177
commit 1320dc6db4
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -1227,6 +1227,13 @@ if __name__ == '__main__':
partial(expect_stanza,
"/message[@from='#foo%{irc_server_one}/{nick_one}'][@id][@to='{jid_one}/{resource_one}'][@type='groupchat']/body[text()='trois']"),
# Send a simple message, with no id
partial(send_stanza, "<message from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}' type='groupchat'><body>hello</body></message>"),
# Expect a non-empty id as a result (should be a uuid)
partial(expect_stanza,
"!/message[@id='']/body[text()='hello']"),
# Second user joins
partial(send_stanza,
"<presence from='{jid_two}/{resource_one}' to='#foo%{irc_server_one}/{nick_two}' />"),