Fix requesting pubsub node configuration, and add tests.

- <default /> doesn't have a type attribute in the XEP
- <configure /> isn't used anymore for requesting default configuration
This commit is contained in:
Lance Stout
2011-08-31 10:43:33 -07:00
parent 5ec4e4a026
commit 2500a0649b
4 changed files with 48 additions and 14 deletions

View File

@@ -22,18 +22,13 @@ class DefaultConfig(ElementBase):
namespace = 'http://jabber.org/protocol/pubsub#owner'
name = 'default'
plugin_attrib = 'default'
interfaces = set(('node', 'type', 'config'))
interfaces = set(('node', 'config'))
plugin_attrib_map = {}
plugin_tag_map = {}
def __init__(self, *args, **kwargs):
ElementBase.__init__(self, *args, **kwargs)
def getType(self):
t = self._getAttr('type')
if not t: t = 'leaf'
return t
def getConfig(self):
return self['form']
@@ -71,7 +66,7 @@ class OwnerConfigure(Configure):
interfaces = set(('node', 'config'))
plugin_attrib_map = {}
plugin_tag_map = {}
def getConfig(self):
return self['form']