def testSchemaSupport (self): i1 = trac26.eAttributes(aReq=2, aProhibited=6) self.assertTrue(i1.validateBinding()) i2 = trac26.eAttributesProhibited(aReq=2) self.assertTrue(i2.validateBinding()) self.assertTrue(isinstance(i2, type(i1))) self.assertFalse(isinstance(i1, type(i2))) instance = trac26.CreateFromDocument(self.Good_xmlt) self.assertEqual(self.Good_xmld, instance.toxml('utf-8', root_only=True))
def testSchemaSupport(self): i1 = trac26.eAttributes(aReq=2, aProhibited=6) self.assertTrue(i1.validateBinding()) i2 = trac26.eAttributesProhibited(aReq=2) self.assertTrue(i2.validateBinding()) self.assertTrue(isinstance(i2, type(i1))) self.assertFalse(isinstance(i1, type(i2))) instance = trac26.CreateFromDocument(self.Good_xmlt) self.assertEqual(self.Good_xmld, instance.toxml('utf-8', root_only=True))
def testDisplay(self): instance = trac26.eAttributesProhibited(aReq=2) if DisplayException: instance.aProhibited = 6
def testSet(self): instance = trac26.eAttributesProhibited(aReq=2) au = instance._AttributeMap['aProhibited'] with self.assertRaises(pyxb.ProhibitedAttributeError) as cm: au.set(instance, 6)
def testAssignment(self): instance = trac26.eAttributesProhibited(aReq=2) with self.assertRaises(pyxb.ProhibitedAttributeError) as cm: instance.aProhibited = 6
def testConstructor(self): instance = None with self.assertRaises(pyxb.ProhibitedAttributeError) as cm: instance = trac26.eAttributesProhibited(aReq=2, aProhibited=6)
def testDisplay (self): instance = trac26.eAttributesProhibited(aReq=2) if DisplayException: instance.aProhibited = 6
def testSet (self): instance = trac26.eAttributesProhibited(aReq=2) au = instance._AttributeMap['aProhibited'] with self.assertRaises(pyxb.ProhibitedAttributeError) as cm: au.set(instance, 6)
def testAssignment (self): instance = trac26.eAttributesProhibited(aReq=2) with self.assertRaises(pyxb.ProhibitedAttributeError) as cm: instance.aProhibited = 6
def testConstructor (self): instance = None with self.assertRaises(pyxb.ProhibitedAttributeError) as cm: instance = trac26.eAttributesProhibited(aReq=2, aProhibited=6)