Exemple #1
0
 def testExtended(self):
     x = common4app.extended('hi', 'there')
     self.assertEqual(x.elt, 'hi')
     self.assertEqual(x.extElt, 'there')
     self.assertTrue(
         issubclass(common4app.extended.typeDefinition(),
                    common.base.typeDefinition()))
Exemple #2
0
 def testApp (self):
     x = common4app.extended('hi', 'there')
     a = app.elt(x)
     xmlt = u'<app:elt xmlns:app="urn:app" xmlns:common="urn:common"><app:xcommon><common:elt>hi</common:elt><common:extElt>there</common:extElt></app:xcommon></app:elt>'
     xmld = xmlt.encode('utf-8')
     self.assertEqual(a.toxml("utf-8", root_only=True), xmld)
Exemple #3
0
 def testExtended (self):
     x = common4app.extended('hi', 'there')
     self.assertEqual(x.elt, 'hi')
     self.assertEqual(x.extElt, 'there')
     self.assertTrue(issubclass(common4app.extended.typeDefinition(), common.base.typeDefinition()))
Exemple #4
0
 def testApp (self):
     x = common4app.extended('hi', 'there')
     a = app.elt(x)
     self.assertEquals('<app:elt xmlns:app="urn:app" xmlns:common="urn:common"><app:xcommon><common:elt>hi</common:elt><common:extElt>there</common:extElt></app:xcommon></app:elt>', a.toxml("utf-8", root_only=True))
Exemple #5
0
 def testApp(self):
     x = common4app.extended('hi', 'there')
     a = app.elt(x)
     self.assertEquals(
         '<app:elt xmlns:app="urn:app" xmlns:common="urn:common"><app:xcommon><common:elt>hi</common:elt><common:extElt>there</common:extElt></app:xcommon></app:elt>',
         a.toxml(root_only=True))
Exemple #6
0
 def testApp(self):
     x = common4app.extended('hi', 'there')
     a = app.elt(x)
     xmlt = u'<app:elt xmlns:app="urn:app" xmlns:common="urn:common"><app:xcommon><common:elt>hi</common:elt><common:extElt>there</common:extElt></app:xcommon></app:elt>'
     xmld = xmlt.encode('utf-8')
     self.assertEqual(a.toxml("utf-8", root_only=True), xmld)