

def test_ack(self):
    msg = hl7.parse(sample_hl7, factory=TestFactory)
    ack = msg.create_ack()
    self.assertIsInstance(ack, TestMessage)
    msg.assertIsInstance(ack(1)(9), TestField)
    self.assertIsInstance(ack(1)(9)(1), TestRepetition)
    self.assertIsInstance(ack(1)(9)(1)(2), TestComponent)
    self.assertEqual('R01', ack(1)(9)(1)(2)(1))

dataset/ETHPy150Open johnpaulett/python-hl7/tests/test_containers.py FactoryTest.test_ack/VarMisuse@40/50 `self`->`msg`