added pubsub tests and fixed match on iterator error

This commit is contained in:
Nathan Fritz
2010-04-19 01:03:27 -07:00
parent 35c157f9d8
commit 212660091f
4 changed files with 24 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ from .. xmlstream.stanzabase import ElementBase, ET, JID
from .. stanza.iq import Iq
from .. basexmpp import basexmpp
from .. xmlstream.xmlstream import XMLStream
import logging
from . import xep_0004
def stanzaPlugin(stanza, plugin):
@@ -283,7 +284,6 @@ class Configure(ElementBase):
self.xml.remove(config)
stanzaPlugin(Pubsub, Configure)
stanzaPlugin(Create, Configure)
class DefaultConfig(ElementBase):
namespace = 'http://jabber.org/protocol/pubsub#owner'

View File

@@ -120,6 +120,8 @@ class ElementBase(tostring.ToString):
if tagargs[0] not in (self.plugins, self.plugin_attrib): return False
founditerable = False
for iterable in self.iterables:
if nodes[1:] == []:
break
founditerable = iterable.match(nodes[1:])
if founditerable: break;
for evals in tagargs[1:]: