summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-09-04 21:04:21 +0200
committerlouiz’ <louiz@louiz.org>2016-09-04 22:58:38 +0200
commit3047bd41b212390da8e3a4dbcf351e79879042dd (patch)
tree3efbf79b20133bed649195e43625d3129ae164d0 /tests
parent1140db3b88bb70cbcab044efa729707bd5a442f6 (diff)
downloadbiboumi-3047bd41b212390da8e3a4dbcf351e79879042dd.tar.gz
biboumi-3047bd41b212390da8e3a4dbcf351e79879042dd.tar.bz2
biboumi-3047bd41b212390da8e3a4dbcf351e79879042dd.tar.xz
biboumi-3047bd41b212390da8e3a4dbcf351e79879042dd.zip
MAM results can be filtered by start and end dates
Diffstat (limited to 'tests')
-rw-r--r--tests/end_to_end/__main__.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py
index 57e91c9..e1779de 100644
--- a/tests/end_to_end/__main__.py
+++ b/tests/end_to_end/__main__.py
@@ -1086,8 +1086,32 @@ if __name__ == '__main__':
),
partial(expect_stanza,
- "/iq[@type='result'][@id='id1'][@from='#foo%{irc_server_one}'][@to='{jid_one}/{resource_one}']")
+ "/iq[@type='result'][@id='id1'][@from='#foo%{irc_server_one}'][@to='{jid_one}/{resource_one}']"),
+ # Retrieve an empty archive by specifying an early “end” date
+ partial(send_stanza, """<iq to='#foo%{irc_server_one}' from='{jid_one}/{resource_one}' type='set' id='id2'>
+ <query xmlns='urn:xmpp:mam:1' queryid='qid2'>
+ <x xmlns='jabber:x:data' type='submit'>
+ <field var='FORM_TYPE' type='hidden'> <value>urn:xmpp:mam:1</value></field>
+ <field var='end'><value>2000-06-07T00:00:00Z</value></field>
+ </x>
+ </query></iq>"""),
+
+ partial(expect_stanza,
+ "/iq[@type='result'][@id='id2'][@from='#foo%{irc_server_one}'][@to='{jid_one}/{resource_one}']"),
+
+ # Retrieve an empty archive by specifying a late “start” date
+ # (note that this test will break in ~1000 years)
+ partial(send_stanza, """<iq to='#foo%{irc_server_one}' from='{jid_one}/{resource_one}' type='set' id='id3'>
+ <query xmlns='urn:xmpp:mam:1' queryid='qid3'>
+ <x xmlns='jabber:x:data' type='submit'>
+ <field var='FORM_TYPE' type='hidden'> <value>urn:xmpp:mam:1</value></field>
+ <field var='start'><value>3016-06-07T00:00:00Z</value></field>
+ </x>
+ </query></iq>"""),
+
+ partial(expect_stanza,
+ "/iq[@type='result'][@id='id3'][@from='#foo%{irc_server_one}'][@to='{jid_one}/{resource_one}']"),
]),
)