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()))
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)
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()))
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))
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))
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)