Various XEPs: Remove deprecated aliases.
This commit is contained in:
@@ -13,7 +13,7 @@ class TestAddresses(SlixTest):
|
||||
def testAddAddress(self):
|
||||
"""Testing adding extended stanza address."""
|
||||
msg = self.Message()
|
||||
msg['addresses'].addAddress(atype='to', jid='to@header1.org')
|
||||
msg['addresses'].add_address(atype='to', jid='to@header1.org')
|
||||
self.check(msg, """
|
||||
<message>
|
||||
<addresses xmlns="http://jabber.org/protocol/address">
|
||||
@@ -23,9 +23,9 @@ class TestAddresses(SlixTest):
|
||||
""")
|
||||
|
||||
msg = self.Message()
|
||||
msg['addresses'].addAddress(atype='replyto',
|
||||
jid='replyto@header1.org',
|
||||
desc='Reply address')
|
||||
msg['addresses'].add_address(atype='replyto',
|
||||
jid='replyto@header1.org',
|
||||
desc='Reply address')
|
||||
self.check(msg, """
|
||||
<message>
|
||||
<addresses xmlns="http://jabber.org/protocol/address">
|
||||
@@ -48,7 +48,7 @@ class TestAddresses(SlixTest):
|
||||
"""
|
||||
|
||||
msg = self.Message()
|
||||
msg['addresses'].setAddresses([
|
||||
msg['addresses'].set_addresses([
|
||||
{'type':'replyto',
|
||||
'jid':'replyto@header1.org',
|
||||
'desc':'Reply address'},
|
||||
@@ -69,9 +69,9 @@ class TestAddresses(SlixTest):
|
||||
"""Testing adding URI attribute to extended stanza address."""
|
||||
|
||||
msg = self.Message()
|
||||
addr = msg['addresses'].addAddress(atype='to',
|
||||
jid='to@header1.org',
|
||||
node='foo')
|
||||
addr = msg['addresses'].add_address(atype='to',
|
||||
jid='to@header1.org',
|
||||
node='foo')
|
||||
self.check(msg, """
|
||||
<message>
|
||||
<addresses xmlns="http://jabber.org/protocol/address">
|
||||
@@ -101,7 +101,7 @@ class TestAddresses(SlixTest):
|
||||
"""
|
||||
|
||||
msg = self.Message()
|
||||
addr = msg['addresses'].addAddress(jid='to@header1.org', atype='to')
|
||||
addr = msg['addresses'].add_address(jid='to@header1.org', atype='to')
|
||||
self.check(msg, xmlstring % '')
|
||||
|
||||
addr['delivered'] = True
|
||||
|
||||
@@ -205,8 +205,8 @@ class TestStreamDisco(SlixTest):
|
||||
handler=dynamic_jid)
|
||||
|
||||
|
||||
self.xmpp['xep_0030'].make_static(jid='tester@localhost',
|
||||
node='testing')
|
||||
self.xmpp['xep_0030'].restore_defaults(jid='tester@localhost',
|
||||
node='testing')
|
||||
|
||||
self.xmpp['xep_0030'].add_identity(jid='tester@localhost',
|
||||
node='testing',
|
||||
@@ -245,8 +245,8 @@ class TestStreamDisco(SlixTest):
|
||||
self.xmpp['xep_0030'].set_node_handler('get_info',
|
||||
handler=dynamic_global)
|
||||
|
||||
self.xmpp['xep_0030'].make_static(jid='user@tester.localhost',
|
||||
node='testing')
|
||||
self.xmpp['xep_0030'].restore_defaults(jid='user@tester.localhost',
|
||||
node='testing')
|
||||
|
||||
self.xmpp['xep_0030'].add_feature(jid='user@tester.localhost',
|
||||
node='testing',
|
||||
@@ -396,8 +396,8 @@ class TestStreamDisco(SlixTest):
|
||||
handler=dynamic_jid)
|
||||
|
||||
|
||||
self.xmpp['xep_0030'].make_static(jid='tester@localhost',
|
||||
node='testing')
|
||||
self.xmpp['xep_0030'].restore_defaults(jid='tester@localhost',
|
||||
node='testing')
|
||||
|
||||
self.xmpp['xep_0030'].add_item(ijid='tester@localhost',
|
||||
node='testing',
|
||||
@@ -436,8 +436,8 @@ class TestStreamDisco(SlixTest):
|
||||
self.xmpp['xep_0030'].set_node_handler('get_items',
|
||||
handler=dynamic_global)
|
||||
|
||||
self.xmpp['xep_0030'].make_static(jid='user@tester.localhost',
|
||||
node='testing')
|
||||
self.xmpp['xep_0030'].restore_defaults(jid='user@tester.localhost',
|
||||
node='testing')
|
||||
|
||||
self.xmpp['xep_0030'].add_item(ijid='user@tester.localhost',
|
||||
node='testing',
|
||||
|
||||
@@ -76,7 +76,7 @@ class TestAdHocCommands(SlixTest):
|
||||
"""Test running a command with no steps."""
|
||||
|
||||
def handle_command(iq, session):
|
||||
form = self.xmpp['xep_0004'].makeForm(ftype='result')
|
||||
form = self.xmpp['xep_0004'].make_form(ftype='result')
|
||||
form.addField(var='foo', ftype='text-single',
|
||||
label='Foo', value='bar')
|
||||
|
||||
@@ -122,7 +122,7 @@ class TestAdHocCommands(SlixTest):
|
||||
results.append(form.get_values()['foo'])
|
||||
session['payload'] = None
|
||||
|
||||
form = self.xmpp['xep_0004'].makeForm('form')
|
||||
form = self.xmpp['xep_0004'].make_form('form')
|
||||
form.addField(var='foo', ftype='text-single', label='Foo')
|
||||
|
||||
session['payload'] = form
|
||||
@@ -198,7 +198,7 @@ class TestAdHocCommands(SlixTest):
|
||||
def handle_step1(form, session):
|
||||
results.append(form.get_values()['foo'])
|
||||
|
||||
form = self.xmpp['xep_0004'].makeForm('form')
|
||||
form = self.xmpp['xep_0004'].make_form('form')
|
||||
form.addField(var='bar', ftype='text-single', label='Bar')
|
||||
|
||||
session['payload'] = form
|
||||
@@ -207,7 +207,7 @@ class TestAdHocCommands(SlixTest):
|
||||
|
||||
return session
|
||||
|
||||
form = self.xmpp['xep_0004'].makeForm('form')
|
||||
form = self.xmpp['xep_0004'].make_form('form')
|
||||
form.addField(var='foo', ftype='text-single', label='Foo')
|
||||
|
||||
session['payload'] = form
|
||||
@@ -312,7 +312,7 @@ class TestAdHocCommands(SlixTest):
|
||||
def handle_cancel(iq, session):
|
||||
results.append('canceled')
|
||||
|
||||
form = self.xmpp['xep_0004'].makeForm('form')
|
||||
form = self.xmpp['xep_0004'].make_form('form')
|
||||
form.addField(var='foo', ftype='text-single', label='Foo')
|
||||
|
||||
session['payload'] = form
|
||||
@@ -380,7 +380,7 @@ class TestAdHocCommands(SlixTest):
|
||||
"""Test adding notes to commands."""
|
||||
|
||||
def handle_command(iq, session):
|
||||
form = self.xmpp['xep_0004'].makeForm(ftype='result')
|
||||
form = self.xmpp['xep_0004'].make_form(ftype='result')
|
||||
form.addField(var='foo', ftype='text-single',
|
||||
label='Foo', value='bar')
|
||||
|
||||
@@ -431,11 +431,11 @@ class TestAdHocCommands(SlixTest):
|
||||
results.append(form.get_values()['FORM_TYPE'])
|
||||
session['payload'] = None
|
||||
|
||||
form1 = self.xmpp['xep_0004'].makeForm('form')
|
||||
form1 = self.xmpp['xep_0004'].make_form('form')
|
||||
form1.addField(var='FORM_TYPE', ftype='hidden', value='form_1')
|
||||
form1.addField(var='foo', ftype='text-single', label='Foo')
|
||||
|
||||
form2 = self.xmpp['xep_0004'].makeForm('form')
|
||||
form2 = self.xmpp['xep_0004'].make_form('form')
|
||||
form2.addField(var='FORM_TYPE', ftype='hidden', value='form_2')
|
||||
form2.addField(var='foo', ftype='text-single', label='Foo')
|
||||
|
||||
@@ -528,7 +528,7 @@ class TestAdHocCommands(SlixTest):
|
||||
results.append(item)
|
||||
|
||||
def handle_step2(iq, session):
|
||||
form = self.xmpp['xep_0004'].makeForm(ftype='submit')
|
||||
form = self.xmpp['xep_0004'].make_form(ftype='submit')
|
||||
form.addField(var='bar', value='123')
|
||||
|
||||
session['custom_data'].append('baz')
|
||||
@@ -537,7 +537,7 @@ class TestAdHocCommands(SlixTest):
|
||||
self.xmpp['xep_0050'].complete_command(session)
|
||||
|
||||
def handle_step1(iq, session):
|
||||
form = self.xmpp['xep_0004'].makeForm(ftype='submit')
|
||||
form = self.xmpp['xep_0004'].make_form(ftype='submit')
|
||||
form.addField(var='foo', value='42')
|
||||
|
||||
session['custom_data'].append('bar')
|
||||
|
||||
@@ -18,7 +18,7 @@ class TestStreamExtendedDisco(SlixTest):
|
||||
'xep_0004',
|
||||
'xep_0128'])
|
||||
|
||||
form = self.xmpp['xep_0004'].makeForm(ftype='result')
|
||||
form = self.xmpp['xep_0004'].make_form(ftype='result')
|
||||
form.addField(var='FORM_TYPE', ftype='hidden', value='testing')
|
||||
|
||||
info_ns = 'http://jabber.org/protocol/disco#info'
|
||||
@@ -57,10 +57,10 @@ class TestStreamExtendedDisco(SlixTest):
|
||||
'xep_0004',
|
||||
'xep_0128'])
|
||||
|
||||
form1 = self.xmpp['xep_0004'].makeForm(ftype='result')
|
||||
form1 = self.xmpp['xep_0004'].make_form(ftype='result')
|
||||
form1.addField(var='FORM_TYPE', ftype='hidden', value='testing')
|
||||
|
||||
form2 = self.xmpp['xep_0004'].makeForm(ftype='result')
|
||||
form2 = self.xmpp['xep_0004'].make_form(ftype='result')
|
||||
form2.addField(var='FORM_TYPE', ftype='hidden', value='testing_2')
|
||||
|
||||
info_ns = 'http://jabber.org/protocol/disco#info'
|
||||
|
||||
Reference in New Issue
Block a user