summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-08-27 12:22:35 -0400
committerLance Stout <lancestout@gmail.com>2010-08-27 12:22:35 -0400
commitbb6f4af8e24f940a837c227b0f2fab2b64e4dc7e (patch)
tree641a340576a644139f9b0a07def8b9b9db753eb2 /sleekxmpp/xmlstream
parent6677df39f2ed3a949fa31df847bb08122190a26d (diff)
downloadslixmpp-bb6f4af8e24f940a837c227b0f2fab2b64e4dc7e.tar.gz
slixmpp-bb6f4af8e24f940a837c227b0f2fab2b64e4dc7e.tar.bz2
slixmpp-bb6f4af8e24f940a837c227b0f2fab2b64e4dc7e.tar.xz
slixmpp-bb6f4af8e24f940a837c227b0f2fab2b64e4dc7e.zip
Added unit tests for StanzaBase.
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py8
1 files changed, 6 insertions, 2 deletions
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):