mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
24 lines
583 B
Python
24 lines
583 B
Python
|
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)
|