示例#1
0
 def testFull(self):
     self._testEqual(toXML('parent', {'a':'c'}, [('c',),
                                                 ('c', {}, [], 'b')], 'b'),
                     '<parent a="c">b<c /><c>b</c></parent>')
示例#2
0
 def testSimpleWithChilds(self):
     self._testEqual(toXML('parent', childs=[('child1',), ('child2',)]),
                     '<parent><child1 /><child2 /></parent>')
示例#3
0
 def testSimpleWithAttrs(self):
     self._testEqual(toXML('elem', {'attr1': 'val',
                                    'attr2': 'val'}),
                     '<elem attr1="val" attr2="val" />')
示例#4
0
 def testSimpleWithBody(self):
     self._testEqual(toXML('elem', body="body"), '<elem>body</elem>')
示例#5
0
 def testSimple(self):
     self._testEqual(toXML('elem'), '<elem />')