def test_assign_value_traversal(self): cmp_str = 'xxx' f1 = Field('PID_39') f2 = Field('PID_39') f1.cwe_1.value = cmp_str f2.cwe_1 = cmp_str self.assertEqual(f1.to_er7(), f2.to_er7()) s1 = Segment('PID') s2 = Segment('PID') s1.pid_39.pid_39_1.value = cmp_str s2.pid_39.pid_39_1 = cmp_str complex_cmp_str = 'xxx&yyy&zzz' f1 = Field('PID_4') f2 = Field('PID_4') f1.cx_10.value = complex_cmp_str f2.cx_10 = complex_cmp_str self.assertEqual(f1.to_er7(), f2.to_er7()) s1.pid_4.pid_4_1.value = complex_cmp_str s2.pid_4.pid_4_1 = complex_cmp_str self.assertEqual(f1.to_er7(), f2.to_er7())