Пример #1
0
 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))
Пример #2
0
 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))
Пример #3
0
 def testDisplay(self):
     instance = trac26.eAttributesProhibited(aReq=2)
     if DisplayException:
         instance.aProhibited = 6
Пример #4
0
 def testSet(self):
     instance = trac26.eAttributesProhibited(aReq=2)
     au = instance._AttributeMap['aProhibited']
     with self.assertRaises(pyxb.ProhibitedAttributeError) as cm:
         au.set(instance, 6)
Пример #5
0
 def testAssignment(self):
     instance = trac26.eAttributesProhibited(aReq=2)
     with self.assertRaises(pyxb.ProhibitedAttributeError) as cm:
         instance.aProhibited = 6
Пример #6
0
 def testConstructor(self):
     instance = None
     with self.assertRaises(pyxb.ProhibitedAttributeError) as cm:
         instance = trac26.eAttributesProhibited(aReq=2, aProhibited=6)
Пример #7
0
 def testDisplay (self):
     instance = trac26.eAttributesProhibited(aReq=2)
     if DisplayException:
         instance.aProhibited = 6
Пример #8
0
 def testSet (self):
     instance = trac26.eAttributesProhibited(aReq=2)
     au = instance._AttributeMap['aProhibited']
     with self.assertRaises(pyxb.ProhibitedAttributeError) as cm:
         au.set(instance, 6)
Пример #9
0
 def testAssignment (self):
     instance = trac26.eAttributesProhibited(aReq=2)
     with self.assertRaises(pyxb.ProhibitedAttributeError) as cm:
         instance.aProhibited = 6
Пример #10
0
 def testConstructor (self):
     instance = None
     with self.assertRaises(pyxb.ProhibitedAttributeError) as cm:
         instance = trac26.eAttributesProhibited(aReq=2, aProhibited=6)