summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-08-13 12:24:47 -0400
committerLance Stout <lancestout@gmail.com>2010-08-13 12:24:47 -0400
commitc20fab0f6c28bcbfbe54db687be056a9b5088ad4 (patch)
tree5119149fc15b54463d52d16e940b68c2f336a43d /tests
parentc721fb412618662d33fa73fb9f9e1f0c4f045fef (diff)
downloadslixmpp-c20fab0f6c28bcbfbe54db687be056a9b5088ad4.tar.gz
slixmpp-c20fab0f6c28bcbfbe54db687be056a9b5088ad4.tar.bz2
slixmpp-c20fab0f6c28bcbfbe54db687be056a9b5088ad4.tar.xz
slixmpp-c20fab0f6c28bcbfbe54db687be056a9b5088ad4.zip
Updated ElementBase.setup, and added unit tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_elementbase.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test_elementbase.py b/tests/test_elementbase.py
new file mode 100644
index 00000000..1b018b44
--- /dev/null
+++ b/tests/test_elementbase.py
@@ -0,0 +1,23 @@
+from . sleektest import *
+from sleekxmpp.xmlstream.stanzabase import ElementBase
+
+class TestElementBase(SleekTest):
+
+ def testExtendedName(self):
+ """Test element names of the form tag1/tag2/tag3."""
+
+ class TestStanza(ElementBase):
+ name = "foo/bar/baz"
+ namespace = "test"
+
+ stanza = TestStanza()
+ self.checkStanza(TestStanza, stanza, """
+ <foo xmlns="test">
+ <bar>
+ <baz />
+ </bar>
+ </foo>
+ """)
+
+
+suite = unittest.TestLoader().loadTestsFromTestCase(TestElementBase)