Beispiel #1
0
 def test_assign_wrong_component_to_known_position(self):
     f1 = Field('pid_10', validation_level=VALIDATION_LEVEL.STRICT)
     with self.assertRaises(ChildNotValid):
         f1.ce_1 = Component('CX_1')
     f2 = Field('pid_3')
     with self.assertRaises(ChildNotValid):   #this one is not raised!!!
         f2.cx_1 = Component('HD_1')
     f2.cx_1 = Component('CX_1')
Beispiel #2
0
 def test_override_field_containing_children_datatype(self):
     a = Field('pid_3')
     a.cx_1 = 'cx_1 value'
     a.cx_4 = 'cx_4 value'
     with self.assertRaises(OperationNotAllowed):
         a.datatype = 'HD'