Various XEPs: Remove deprecated aliases.
This commit is contained in:
		@@ -61,7 +61,7 @@ operation using these stanzas without doing any complex operations such as
 | 
				
			|||||||
checking an ACL, etc.
 | 
					checking an ACL, etc.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
You may find it necessary at some point to revert a particular node or JID to
 | 
					You may find it necessary at some point to revert a particular node or JID to
 | 
				
			||||||
using the default, static handlers. To do so, use the method ``make_static()``.
 | 
					using the default, static handlers. To do so, use the method ``restore_defaults()``.
 | 
				
			||||||
You may also elect to only convert a given set of actions instead.
 | 
					You may also elect to only convert a given set of actions instead.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Creating a Node Handler
 | 
					Creating a Node Handler
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -68,7 +68,7 @@ class CommandBot(slixmpp.ClientXMPP):
 | 
				
			|||||||
                       session. Additional, custom data may be saved
 | 
					                       session. Additional, custom data may be saved
 | 
				
			||||||
                       here to persist across handler callbacks.
 | 
					                       here to persist across handler callbacks.
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        form = self['xep_0004'].makeForm('form', 'Greeting')
 | 
					        form = self['xep_0004'].make_form('form', 'Greeting')
 | 
				
			||||||
        form['instructions'] = 'Send a custom greeting to a JID'
 | 
					        form['instructions'] = 'Send a custom greeting to a JID'
 | 
				
			||||||
        form.addField(var='greeting',
 | 
					        form.addField(var='greeting',
 | 
				
			||||||
                      ftype='text-single',
 | 
					                      ftype='text-single',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -94,7 +94,7 @@ class CommandUserBot(slixmpp.ClientXMPP):
 | 
				
			|||||||
        #          label="Your greeting" />
 | 
					        #          label="Your greeting" />
 | 
				
			||||||
        # </x>
 | 
					        # </x>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        form = self['xep_0004'].makeForm(ftype='submit')
 | 
					        form = self['xep_0004'].make_form(ftype='submit')
 | 
				
			||||||
        form.addField(var='greeting',
 | 
					        form.addField(var='greeting',
 | 
				
			||||||
                      value=session['greeting'])
 | 
					                      value=session['greeting'])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,3 @@ from slixmpp.features.feature_bind.stanza import Bind
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(FeatureBind)
 | 
					register_plugin(FeatureBind)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
feature_bind = FeatureBind
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,7 +16,3 @@ from slixmpp.features.feature_mechanisms.stanza import Failure
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(FeatureMechanisms)
 | 
					register_plugin(FeatureMechanisms)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
feature_mechanisms = FeatureMechanisms
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,3 @@ from slixmpp.features.feature_rosterver.stanza import RosterVer
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(FeatureRosterVer)
 | 
					register_plugin(FeatureRosterVer)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
feature_rosterver = FeatureRosterVer
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,3 @@ from slixmpp.features.feature_session.stanza import Session
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(FeatureSession)
 | 
					register_plugin(FeatureSession)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
feature_session = FeatureSession
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,3 @@ from slixmpp.features.feature_starttls.stanza import *
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(FeatureSTARTTLS)
 | 
					register_plugin(FeatureSTARTTLS)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
feature_starttls = FeatureSTARTTLS
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,9 +14,3 @@ from slixmpp.plugins.xep_0004.dataforms import XEP_0004
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0004)
 | 
					register_plugin(XEP_0004)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0004 = XEP_0004
 | 
					 | 
				
			||||||
xep_0004.makeForm = xep_0004.make_form
 | 
					 | 
				
			||||||
xep_0004.buildForm = xep_0004.build_form
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,3 @@ from slixmpp.plugins.xep_0009.stanza import RPCQuery, MethodCall, MethodResponse
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0009)
 | 
					register_plugin(XEP_0009)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0009 = XEP_0009
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,3 @@ from slixmpp.plugins.xep_0012.last_activity import XEP_0012
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0012)
 | 
					register_plugin(XEP_0012)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0004 = XEP_0012
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,8 +15,3 @@ from slixmpp.plugins.xep_0030.disco import XEP_0030
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0030)
 | 
					register_plugin(XEP_0030)
 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0030 = XEP_0030
 | 
					 | 
				
			||||||
XEP_0030.getInfo = XEP_0030.get_info
 | 
					 | 
				
			||||||
XEP_0030.make_static = XEP_0030.restore_defaults
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,3 @@ from slixmpp.plugins.xep_0033.addresses import XEP_0033
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0033)
 | 
					register_plugin(XEP_0033)
 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0033 = XEP_0033
 | 
					 | 
				
			||||||
Addresses.addAddress = Addresses.add_address
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -118,14 +118,8 @@ for atype in ('all', 'bcc', 'cc', 'noreply', 'replyroom', 'replyto', 'to'):
 | 
				
			|||||||
    setattr(Addresses, "del_%s" % atype, del_multi)
 | 
					    setattr(Addresses, "del_%s" % atype, del_multi)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # To retain backwards compatibility:
 | 
					    # To retain backwards compatibility:
 | 
				
			||||||
    setattr(Addresses, "get%s" % atype.title(), get_multi)
 | 
					 | 
				
			||||||
    setattr(Addresses, "set%s" % atype.title(), set_multi)
 | 
					 | 
				
			||||||
    setattr(Addresses, "del%s" % atype.title(), del_multi)
 | 
					 | 
				
			||||||
    if atype == 'all':
 | 
					    if atype == 'all':
 | 
				
			||||||
        Addresses.interfaces.add('addresses')
 | 
					        Addresses.interfaces.add('addresses')
 | 
				
			||||||
        setattr(Addresses, "getAddresses", get_multi)
 | 
					 | 
				
			||||||
        setattr(Addresses, "setAddresses", set_multi)
 | 
					 | 
				
			||||||
        setattr(Addresses, "delAddresses", del_multi)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_stanza_plugin(Addresses, Address, iterable=True)
 | 
					register_stanza_plugin(Addresses, Address, iterable=True)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -360,7 +360,7 @@ class XEP_0045(BasePlugin):
 | 
				
			|||||||
        form = result.xml.find('{http://jabber.org/protocol/muc#owner}query/{jabber:x:data}x')
 | 
					        form = result.xml.find('{http://jabber.org/protocol/muc#owner}query/{jabber:x:data}x')
 | 
				
			||||||
        if form is None:
 | 
					        if form is None:
 | 
				
			||||||
            raise ValueError
 | 
					            raise ValueError
 | 
				
			||||||
        return self.xmpp.plugin['xep_0004'].buildForm(form)
 | 
					        return self.xmpp.plugin['xep_0004'].build_form(form)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def cancelConfig(self, room, ifrom=None):
 | 
					    def cancelConfig(self, room, ifrom=None):
 | 
				
			||||||
        query = ET.Element('{http://jabber.org/protocol/muc#owner}query')
 | 
					        query = ET.Element('{http://jabber.org/protocol/muc#owner}query')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,3 @@ from slixmpp.plugins.xep_0047.ibb import XEP_0047
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0047)
 | 
					register_plugin(XEP_0047)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0047 = XEP_0047
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,3 @@ from slixmpp.plugins.xep_0050.adhoc import XEP_0050
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0050)
 | 
					register_plugin(XEP_0050)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0050 = XEP_0050
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,6 +13,3 @@ from slixmpp.plugins.xep_0059.rsm import ResultIterator, XEP_0059
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0059)
 | 
					register_plugin(XEP_0059)
 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0059 = XEP_0059
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,3 @@ from slixmpp.plugins.xep_0060 import stanza
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0060)
 | 
					register_plugin(XEP_0060)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0060 = XEP_0060
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,3 @@ from slixmpp.plugins.xep_0066.oob import XEP_0066
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0066)
 | 
					register_plugin(XEP_0066)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0066 = XEP_0066
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,3 @@ from slixmpp.plugins.xep_0077.register import XEP_0077
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0077)
 | 
					register_plugin(XEP_0077)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0077 = XEP_0077
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,3 @@ from slixmpp.plugins.xep_0078.legacyauth import XEP_0078
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0078)
 | 
					register_plugin(XEP_0078)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0078 = XEP_0078
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,3 @@ from slixmpp.plugins.xep_0085.chat_states import XEP_0085
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0085)
 | 
					register_plugin(XEP_0085)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0085 = XEP_0085
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,3 @@ from slixmpp.plugins.xep_0086.legacy_error import XEP_0086
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0086)
 | 
					register_plugin(XEP_0086)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0086 = XEP_0086
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,3 @@ from slixmpp.plugins.xep_0092.version import XEP_0092
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0092)
 | 
					register_plugin(XEP_0092)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0092 = XEP_0092
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,3 @@ from slixmpp.plugins.xep_0115.caps import XEP_0115
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0115)
 | 
					register_plugin(XEP_0115)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0115 = XEP_0115
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,3 @@ from slixmpp.plugins.xep_0122.data_validation import XEP_0122
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0122)
 | 
					register_plugin(XEP_0122)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0122 = XEP_0122
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,3 @@ from slixmpp.plugins.xep_0128.extended_disco import XEP_0128
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0128)
 | 
					register_plugin(XEP_0128)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0128 = XEP_0128
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,3 @@ from slixmpp.plugins.xep_0184.receipt import XEP_0184
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0184)
 | 
					register_plugin(XEP_0184)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0184 = XEP_0184
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,8 +13,3 @@ from slixmpp.plugins.xep_0199.ping import XEP_0199
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0199)
 | 
					register_plugin(XEP_0199)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Backwards compatibility for names
 | 
					 | 
				
			||||||
xep_0199 = XEP_0199
 | 
					 | 
				
			||||||
xep_0199.sendPing = xep_0199.send_ping
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,3 @@ from slixmpp.plugins.xep_0202.time import XEP_0202
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0202)
 | 
					register_plugin(XEP_0202)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0202 = XEP_0202
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,6 +14,3 @@ from slixmpp.plugins.xep_0203.delay import XEP_0203
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0203)
 | 
					register_plugin(XEP_0203)
 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0203 = XEP_0203
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,3 @@ from slixmpp.plugins.xep_0224.attention import XEP_0224
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0224)
 | 
					register_plugin(XEP_0224)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0224 = XEP_0224
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,3 @@ from slixmpp.plugins.xep_0249.invite import XEP_0249
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
register_plugin(XEP_0249)
 | 
					register_plugin(XEP_0249)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Retain some backwards compatibility
 | 
					 | 
				
			||||||
xep_0249 = XEP_0249
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,7 @@ class TestAddresses(SlixTest):
 | 
				
			|||||||
    def testAddAddress(self):
 | 
					    def testAddAddress(self):
 | 
				
			||||||
        """Testing adding extended stanza address."""
 | 
					        """Testing adding extended stanza address."""
 | 
				
			||||||
        msg = self.Message()
 | 
					        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, """
 | 
					        self.check(msg, """
 | 
				
			||||||
        <message>
 | 
					        <message>
 | 
				
			||||||
          <addresses xmlns="http://jabber.org/protocol/address">
 | 
					          <addresses xmlns="http://jabber.org/protocol/address">
 | 
				
			||||||
@@ -23,9 +23,9 @@ class TestAddresses(SlixTest):
 | 
				
			|||||||
        """)
 | 
					        """)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        msg = self.Message()
 | 
					        msg = self.Message()
 | 
				
			||||||
        msg['addresses'].addAddress(atype='replyto',
 | 
					        msg['addresses'].add_address(atype='replyto',
 | 
				
			||||||
                                    jid='replyto@header1.org',
 | 
					                                     jid='replyto@header1.org',
 | 
				
			||||||
                                    desc='Reply address')
 | 
					                                     desc='Reply address')
 | 
				
			||||||
        self.check(msg, """
 | 
					        self.check(msg, """
 | 
				
			||||||
          <message>
 | 
					          <message>
 | 
				
			||||||
            <addresses xmlns="http://jabber.org/protocol/address">
 | 
					            <addresses xmlns="http://jabber.org/protocol/address">
 | 
				
			||||||
@@ -48,7 +48,7 @@ class TestAddresses(SlixTest):
 | 
				
			|||||||
        """
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        msg = self.Message()
 | 
					        msg = self.Message()
 | 
				
			||||||
        msg['addresses'].setAddresses([
 | 
					        msg['addresses'].set_addresses([
 | 
				
			||||||
            {'type':'replyto',
 | 
					            {'type':'replyto',
 | 
				
			||||||
             'jid':'replyto@header1.org',
 | 
					             'jid':'replyto@header1.org',
 | 
				
			||||||
             'desc':'Reply address'},
 | 
					             'desc':'Reply address'},
 | 
				
			||||||
@@ -69,9 +69,9 @@ class TestAddresses(SlixTest):
 | 
				
			|||||||
        """Testing adding URI attribute to extended stanza address."""
 | 
					        """Testing adding URI attribute to extended stanza address."""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        msg = self.Message()
 | 
					        msg = self.Message()
 | 
				
			||||||
        addr = msg['addresses'].addAddress(atype='to',
 | 
					        addr = msg['addresses'].add_address(atype='to',
 | 
				
			||||||
                                           jid='to@header1.org',
 | 
					                                            jid='to@header1.org',
 | 
				
			||||||
                                           node='foo')
 | 
					                                            node='foo')
 | 
				
			||||||
        self.check(msg, """
 | 
					        self.check(msg, """
 | 
				
			||||||
          <message>
 | 
					          <message>
 | 
				
			||||||
            <addresses xmlns="http://jabber.org/protocol/address">
 | 
					            <addresses xmlns="http://jabber.org/protocol/address">
 | 
				
			||||||
@@ -101,7 +101,7 @@ class TestAddresses(SlixTest):
 | 
				
			|||||||
        """
 | 
					        """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        msg = self.Message()
 | 
					        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 % '')
 | 
					        self.check(msg, xmlstring % '')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        addr['delivered'] = True
 | 
					        addr['delivered'] = True
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -205,8 +205,8 @@ class TestStreamDisco(SlixTest):
 | 
				
			|||||||
                                               handler=dynamic_jid)
 | 
					                                               handler=dynamic_jid)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.xmpp['xep_0030'].make_static(jid='tester@localhost',
 | 
					        self.xmpp['xep_0030'].restore_defaults(jid='tester@localhost',
 | 
				
			||||||
                                          node='testing')
 | 
					                                               node='testing')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.xmpp['xep_0030'].add_identity(jid='tester@localhost',
 | 
					        self.xmpp['xep_0030'].add_identity(jid='tester@localhost',
 | 
				
			||||||
                                           node='testing',
 | 
					                                           node='testing',
 | 
				
			||||||
@@ -245,8 +245,8 @@ class TestStreamDisco(SlixTest):
 | 
				
			|||||||
        self.xmpp['xep_0030'].set_node_handler('get_info',
 | 
					        self.xmpp['xep_0030'].set_node_handler('get_info',
 | 
				
			||||||
                                               handler=dynamic_global)
 | 
					                                               handler=dynamic_global)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.xmpp['xep_0030'].make_static(jid='user@tester.localhost',
 | 
					        self.xmpp['xep_0030'].restore_defaults(jid='user@tester.localhost',
 | 
				
			||||||
                                          node='testing')
 | 
					                                               node='testing')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.xmpp['xep_0030'].add_feature(jid='user@tester.localhost',
 | 
					        self.xmpp['xep_0030'].add_feature(jid='user@tester.localhost',
 | 
				
			||||||
                                          node='testing',
 | 
					                                          node='testing',
 | 
				
			||||||
@@ -396,8 +396,8 @@ class TestStreamDisco(SlixTest):
 | 
				
			|||||||
                                               handler=dynamic_jid)
 | 
					                                               handler=dynamic_jid)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.xmpp['xep_0030'].make_static(jid='tester@localhost',
 | 
					        self.xmpp['xep_0030'].restore_defaults(jid='tester@localhost',
 | 
				
			||||||
                                          node='testing')
 | 
					                                               node='testing')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.xmpp['xep_0030'].add_item(ijid='tester@localhost',
 | 
					        self.xmpp['xep_0030'].add_item(ijid='tester@localhost',
 | 
				
			||||||
                                       node='testing',
 | 
					                                       node='testing',
 | 
				
			||||||
@@ -436,8 +436,8 @@ class TestStreamDisco(SlixTest):
 | 
				
			|||||||
        self.xmpp['xep_0030'].set_node_handler('get_items',
 | 
					        self.xmpp['xep_0030'].set_node_handler('get_items',
 | 
				
			||||||
                                               handler=dynamic_global)
 | 
					                                               handler=dynamic_global)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.xmpp['xep_0030'].make_static(jid='user@tester.localhost',
 | 
					        self.xmpp['xep_0030'].restore_defaults(jid='user@tester.localhost',
 | 
				
			||||||
                                          node='testing')
 | 
					                                               node='testing')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.xmpp['xep_0030'].add_item(ijid='user@tester.localhost',
 | 
					        self.xmpp['xep_0030'].add_item(ijid='user@tester.localhost',
 | 
				
			||||||
                                       node='testing',
 | 
					                                       node='testing',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -76,7 +76,7 @@ class TestAdHocCommands(SlixTest):
 | 
				
			|||||||
        """Test running a command with no steps."""
 | 
					        """Test running a command with no steps."""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        def handle_command(iq, session):
 | 
					        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',
 | 
					            form.addField(var='foo', ftype='text-single',
 | 
				
			||||||
                          label='Foo', value='bar')
 | 
					                          label='Foo', value='bar')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -122,7 +122,7 @@ class TestAdHocCommands(SlixTest):
 | 
				
			|||||||
                results.append(form.get_values()['foo'])
 | 
					                results.append(form.get_values()['foo'])
 | 
				
			||||||
                session['payload'] = None
 | 
					                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')
 | 
					            form.addField(var='foo', ftype='text-single', label='Foo')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            session['payload'] = form
 | 
					            session['payload'] = form
 | 
				
			||||||
@@ -198,7 +198,7 @@ class TestAdHocCommands(SlixTest):
 | 
				
			|||||||
            def handle_step1(form, session):
 | 
					            def handle_step1(form, session):
 | 
				
			||||||
                results.append(form.get_values()['foo'])
 | 
					                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')
 | 
					                form.addField(var='bar', ftype='text-single', label='Bar')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                session['payload'] = form
 | 
					                session['payload'] = form
 | 
				
			||||||
@@ -207,7 +207,7 @@ class TestAdHocCommands(SlixTest):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                return session
 | 
					                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')
 | 
					            form.addField(var='foo', ftype='text-single', label='Foo')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            session['payload'] = form
 | 
					            session['payload'] = form
 | 
				
			||||||
@@ -312,7 +312,7 @@ class TestAdHocCommands(SlixTest):
 | 
				
			|||||||
            def handle_cancel(iq, session):
 | 
					            def handle_cancel(iq, session):
 | 
				
			||||||
                results.append('canceled')
 | 
					                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')
 | 
					            form.addField(var='foo', ftype='text-single', label='Foo')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            session['payload'] = form
 | 
					            session['payload'] = form
 | 
				
			||||||
@@ -380,7 +380,7 @@ class TestAdHocCommands(SlixTest):
 | 
				
			|||||||
        """Test adding notes to commands."""
 | 
					        """Test adding notes to commands."""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        def handle_command(iq, session):
 | 
					        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',
 | 
					            form.addField(var='foo', ftype='text-single',
 | 
				
			||||||
                          label='Foo', value='bar')
 | 
					                          label='Foo', value='bar')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -431,11 +431,11 @@ class TestAdHocCommands(SlixTest):
 | 
				
			|||||||
                    results.append(form.get_values()['FORM_TYPE'])
 | 
					                    results.append(form.get_values()['FORM_TYPE'])
 | 
				
			||||||
                session['payload'] = None
 | 
					                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='FORM_TYPE', ftype='hidden', value='form_1')
 | 
				
			||||||
            form1.addField(var='foo', ftype='text-single', label='Foo')
 | 
					            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='FORM_TYPE', ftype='hidden', value='form_2')
 | 
				
			||||||
            form2.addField(var='foo', ftype='text-single', label='Foo')
 | 
					            form2.addField(var='foo', ftype='text-single', label='Foo')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -528,7 +528,7 @@ class TestAdHocCommands(SlixTest):
 | 
				
			|||||||
                results.append(item)
 | 
					                results.append(item)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        def handle_step2(iq, session):
 | 
					        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')
 | 
					            form.addField(var='bar', value='123')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            session['custom_data'].append('baz')
 | 
					            session['custom_data'].append('baz')
 | 
				
			||||||
@@ -537,7 +537,7 @@ class TestAdHocCommands(SlixTest):
 | 
				
			|||||||
            self.xmpp['xep_0050'].complete_command(session)
 | 
					            self.xmpp['xep_0050'].complete_command(session)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        def handle_step1(iq, 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')
 | 
					            form.addField(var='foo', value='42')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            session['custom_data'].append('bar')
 | 
					            session['custom_data'].append('bar')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,7 @@ class TestStreamExtendedDisco(SlixTest):
 | 
				
			|||||||
                                   'xep_0004',
 | 
					                                   'xep_0004',
 | 
				
			||||||
                                   'xep_0128'])
 | 
					                                   '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')
 | 
					        form.addField(var='FORM_TYPE', ftype='hidden', value='testing')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        info_ns = 'http://jabber.org/protocol/disco#info'
 | 
					        info_ns = 'http://jabber.org/protocol/disco#info'
 | 
				
			||||||
@@ -57,10 +57,10 @@ class TestStreamExtendedDisco(SlixTest):
 | 
				
			|||||||
                                   'xep_0004',
 | 
					                                   'xep_0004',
 | 
				
			||||||
                                   'xep_0128'])
 | 
					                                   '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')
 | 
					        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')
 | 
					        form2.addField(var='FORM_TYPE', ftype='hidden', value='testing_2')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        info_ns = 'http://jabber.org/protocol/disco#info'
 | 
					        info_ns = 'http://jabber.org/protocol/disco#info'
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user