summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-08-23 15:21:12 +0200
committerlouiz’ <louiz@louiz.org>2018-08-23 22:18:49 +0200
commit7d0df9b6ddee8db69ea0a511f031f32a4537a749 (patch)
tree86b1105169b6bf7ea5eea88fac3ec75597231d38 /tests
parent6c431b64d050a13853ebf3715fb6bf7986c0cff1 (diff)
downloadbiboumi-7d0df9b6ddee8db69ea0a511f031f32a4537a749.tar.gz
biboumi-7d0df9b6ddee8db69ea0a511f031f32a4537a749.tar.bz2
biboumi-7d0df9b6ddee8db69ea0a511f031f32a4537a749.tar.xz
biboumi-7d0df9b6ddee8db69ea0a511f031f32a4537a749.zip
Disable the throttle limit if negative
Also, invalid values result in -1 being set
Diffstat (limited to 'tests')
-rw-r--r--tests/end_to_end/__main__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py
index 6e254b0..24bc492 100644
--- a/tests/end_to_end/__main__.py
+++ b/tests/end_to_end/__main__.py
@@ -2973,6 +2973,7 @@ if __name__ == '__main__':
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-multi'][@var='tls_ports']/dataform:value[text()='6697']",
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='boolean'][@var='verify_cert']/dataform:value[text()='true']",
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='fingerprint']",
+ "/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='throttle_limit']",
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-private'][@var='pass']",
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-multi'][@var='after_connect_commands']",
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='nick']",
@@ -2995,6 +2996,7 @@ if __name__ == '__main__':
"<field var='after_connect_commands'><value>first command</value><value>second command</value></field>"
"<field var='nick'><value>my_nickname</value></field>"
"<field var='username'><value>username</value></field>"
+ "<field var='throttle_limit'><value>42</value></field>"
"<field var='realname'><value>realname</value></field>"
"<field var='encoding_out'><value>UTF-8</value></field>"
"<field var='encoding_in'><value>latin-1</value></field>"
@@ -3016,6 +3018,7 @@ if __name__ == '__main__':
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-multi'][@var='after_connect_commands']/dataform:value[text()='second command']",
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='username']/dataform:value[text()='username']",
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='realname']/dataform:value[text()='realname']",
+ "/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='throttle_limit']/dataform:value[text()='42']",
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='encoding_in']/dataform:value[text()='latin-1']",
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='encoding_out']/dataform:value[text()='UTF-8']",
"/iq/commands:command/commands:actions/commands:next",
@@ -3037,6 +3040,7 @@ if __name__ == '__main__':
"<field var='after_connect_commands'></field>"
"<field var='username'><value></value></field>"
"<field var='realname'><value></value></field>"
+ "<field var='throttle_limit'><value></value></field>"
"<field var='encoding_out'><value></value></field>"
"<field var='encoding_in'><value></value></field>"
"</x></command></iq>"),
@@ -3054,6 +3058,7 @@ if __name__ == '__main__':
"!/iq/commands:command/dataform:x[@type='form']/dataform:field[@var='encoding_in']/dataform:value",
"!/iq/commands:command/dataform:x[@type='form']/dataform:field[@var='encoding_out']/dataform:value",
"/iq/commands:command/commands:actions/commands:next",
+ "/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='throttle_limit']/dataform:value[text()='-1']", # An invalid value sets this field to -1, aka disabled
),
after = partial(save_value, "sessionid", partial(extract_attribute, "/iq[@type='result']/commands:command[@node='configure']", "sessionid"))
),