summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-05-05 00:38:01 +0200
committerlouiz’ <louiz@louiz.org>2017-05-05 00:38:01 +0200
commitf200126f61559685e866114acc5de5c01bf9ff51 (patch)
treed5b84f0e7f55644d35cf8711bcf4d7b161e64598 /tests
parent2588efb6ba9afe121d22624c78ad54583b19aaab (diff)
downloadbiboumi-f200126f61559685e866114acc5de5c01bf9ff51.tar.gz
biboumi-f200126f61559685e866114acc5de5c01bf9ff51.tar.bz2
biboumi-f200126f61559685e866114acc5de5c01bf9ff51.tar.xz
biboumi-f200126f61559685e866114acc5de5c01bf9ff51.zip
Add an execute_incomplete_hello_adhoc_command e2e test
Diffstat (limited to 'tests')
-rw-r--r--tests/end_to_end/__main__.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py
index c5a4288..17e099a 100644
--- a/tests/end_to_end/__main__.py
+++ b/tests/end_to_end/__main__.py
@@ -857,11 +857,22 @@ if __name__ == '__main__':
"/iq/commands:command/commands:actions/commands:next",
),
after = partial(save_value, "sessionid", partial(extract_attribute, "/iq[@type='result']/commands:command[@node='hello']", "sessionid"))
-
),
partial(send_stanza, "<iq type='set' id='hello-command2' from='{jid_one}/{resource_one}' to='{biboumi_host}'><command xmlns='http://jabber.org/protocol/commands' node='hello' sessionid='{sessionid}' action='next'><x xmlns='jabber:x:data' type='submit'><field var='name'><value>COUCOU</value></field></x></command></iq>"),
partial(expect_stanza, "/iq[@type='result']/commands:command[@node='hello'][@status='completed']/commands:note[@type='info'][text()='Hello COUCOU!']")
]),
+ Scenario("execute_incomplete_hello_adhoc_command",
+ [
+ handshake_sequence(),
+ partial(send_stanza, "<iq type='set' id='hello-command1' from='{jid_one}/{resource_one}' to='{biboumi_host}'><command xmlns='http://jabber.org/protocol/commands' node='hello' action='execute' /></iq>"),
+ partial(expect_stanza, ("/iq[@type='result']/commands:command[@node='hello'][@sessionid][@status='executing']",
+ "/iq/commands:command/commands:actions/commands:next",
+ ),
+ after = partial(save_value, "sessionid", partial(extract_attribute, "/iq[@type='result']/commands:command[@node='hello']", "sessionid"))
+ ),
+ partial(send_stanza, "<iq type='set' id='hello-command2' from='{jid_one}/{resource_one}' to='{biboumi_host}'><command xmlns='http://jabber.org/protocol/commands' node='hello' sessionid='{sessionid}' action='next'><x xmlns='jabber:x:data' type='submit'></x></command></iq>"),
+ partial(expect_stanza, "/iq[@type='error']")
+ ]),
Scenario("execute_ping_adhoc_command",
[
handshake_sequence(),