From c20fab0f6c28bcbfbe54db687be056a9b5088ad4 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 13 Aug 2010 12:24:47 -0400 Subject: Updated ElementBase.setup, and added unit tests. --- tests/test_elementbase.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/test_elementbase.py (limited to 'tests') 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, """ + + + + + + """) + + +suite = unittest.TestLoader().loadTestsFromTestCase(TestElementBase) -- cgit v1.2.3