def testPythonVisitorWorks( self ): python= X12.map.source.FlatPythonVisitor( "parse_278" ) parse_278.visit( python ) text= python.getSource() exec text self.assertEqual( type(parse_278), X12.parse.Message ) msg= parse_278.unmarshall( self.msg1 ) # XXX - check the resulting structure self.assertEquals( self.msg1, msg.marshall() )
def testParse( self ): message= parse_278.unmarshall( self.msg1 ) self.assertEquals( self.msg1, message.marshall() )