from scenarios import *
scenario = (
# First, use an adhoc command to configure how we connect to the irc server, configure
# only one TLS port, and disable the cert verification.
send_stanza(""),
expect_stanza("/iq[@type='result']",
after = save_value("sessionid", extract_attribute("/iq[@type='result']/commands:command[@node='configure']", "sessionid"))),
send_stanza(""
""
""
""
"7778"
"0"
"my_special_nickname"
""),
expect_stanza("/iq[@type='result']/commands:command[@node='configure'][@status='completed']/commands:note[@type='info'][text()='Configuration successfully applied.']"),
send_stanza(""),
sequences.connection_tls("irc.localhost", '{jid_one}/{resource_one}'),
expect_stanza("/presence[@to='{jid_one}/{resource_one}'][@from='#foo%{irc_server_one}/my_special_nickname']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']",
"/presence/muc_user:x/muc_user:status[@code='110']"),
expect_stanza("/message[@from='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]"),
)