def test_Format3(self): path_str = '/2000A/2000B/2300/2400/SV2[421]01' path = pyx12.path.X12Path(path_str) self.assertEqual(path_str, path.format())
def testLoopSegOK1(self): path_str = '/ISA_LOOP/GS_LOOP/ST_LOOP/DETAIL/2000A/2000B/2300/2400/SV2' path = pyx12.path.X12Path(path_str) self.assertEqual(path_str, path.format()) self.assertEqual(path.seg_id, 'SV2')
def testLoopOK1(self): path_str = '/ISA_LOOP/GS_LOOP/ST_LOOP/DETAIL/2000A/2000B/2300/2400' path = pyx12.path.X12Path(path_str) self.assertEqual(path_str, path.format()) self.assertEqual(path.seg_id, None) self.assertEqual(path.loop_list[2], 'ST_LOOP')