

def test_parse(self):
    msg = hl7.parse(sample_hl7, factory=TestFactory)
    self.assertIsInstance(msg, TestMessage)
    s = msg.segments('OBX')
    self.assertIsInstance(s[0], TestSegment)
    self.assertIsInstance(s[0](3), TestField)
    self.assertIsInstance(s[0](3)(1), TestRepetition)
    self.assertIsInstance(s[0](3)(1)(1), TestComponent)
    s.assertEqual('1554-5', s[0](3)(1)(1)(1))

dataset/ETHPy150Open johnpaulett/python-hl7/tests/test_containers.py FactoryTest.test_parse/VarMisuse@107/133 `self`->`s`