From bb6f4af8e24f940a837c227b0f2fab2b64e4dc7e Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 27 Aug 2010 12:22:35 -0400 Subject: Added unit tests for StanzaBase. --- sleekxmpp/xmlstream/stanzabase.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sleekxmpp/xmlstream') diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py index 51966a4e..d7c7c7b4 100644 --- a/sleekxmpp/xmlstream/stanzabase.py +++ b/sleekxmpp/xmlstream/stanzabase.py @@ -1014,9 +1014,13 @@ class StanzaBase(ElementBase): Add XML content to the stanza. Arguments: - value -- An XML object, or a stanza object. + value -- Either an XML or a stanza object, or a list + of XML or stanza objects. """ - self.xml.append(value) + if not isinstance(value, list): + value = [value] + for val in value: + self.append(val) return self def delPayload(self): -- cgit v1.2.3