Example #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')
Example #2
0
 def test_assign_value_with_overridden_datatype(self):
     a = Field('pid_3', 'CE') #official datatype is CX
     a.ce_1 = 'xyz'
     self.assertEqual(a.to_er7(), 'xyz')