from scenarios import * scenario = ( # 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']"), )