def test_cc(self):
     """Testing for converting CarrierClaim"""
     result = StringIO()
     infile = open('test/data/cc.csv')
     # the content of cc.xml is validated against the xsd schema via xmllint,
     # an opensource command-line tools
     expecting_file = open('test/data/cc.xml', 'r')
     expecting = expecting_file.read()
     expecting_file.close()
     csvobj2xmlobj(infile, result, 'CarrierClaim')
     infile.close()
     self.assertEqual(result.getvalue(), expecting)
 def test_bs(self):
     """Testing for converting BeneficiarySummary"""
     result = StringIO()
     infile = open('test/data/bs.csv')
     # the content of bs.xml is validated against the xsd schema via xmllint,
     # an opensource command-line tools
     expecting_file = open('test/data/bs.xml', 'r')
     expecting = expecting_file.read()
     expecting_file.close()
     csvobj2xmlobj(infile, result, 'BeneficiarySummary')
     infile.close()
     self.assertEqual(result.getvalue(), expecting)