From 752cb86d8a5db9e89648c7002dcef6bc20c197eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 3 Nov 2019 22:30:20 +0100 Subject: e2e: Test the behaviour on bad integer value for ad-hoc confs --- tests/end_to_end/scenarios/configure_bad_value.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/end_to_end/scenarios/configure_bad_value.py diff --git a/tests/end_to_end/scenarios/configure_bad_value.py b/tests/end_to_end/scenarios/configure_bad_value.py new file mode 100644 index 0000000..83b9b11 --- /dev/null +++ b/tests/end_to_end/scenarios/configure_bad_value.py @@ -0,0 +1,23 @@ +from scenarios import * + +scenario = ( + sequences.handshake(), + + # Configure the throttle option with an incorrect value + send_stanza(""), + expect_stanza("/iq[@type='result']", + after = save_value("sessionid", extract_attribute("/iq[@type='result']/commands:command[@node='configure']", "sessionid"))), + send_stanza("" + "" + "" + "bleh" + "bleh" + ""), + expect_stanza("/iq[@type='result']/commands:command[@node='configure'][@status='completed']"), + + # These options should have their default value + send_stanza(""), + expect_stanza("/iq[@type='result']", + "/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='throttle_limit']/dataform:value[text()='10']", + "/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='max_history_length']/dataform:value[text()='20']"), +) -- cgit v1.2.3