コード例 #1
0
 def test_cfdi33_detail_01_from_bytes_ok(self):
     path_xml = "./tests/Resources/cfd33_detail_01.xml"
     xml_bytes = None
     with io.open(path_xml, 'r', encoding='utf8') as f:
         xml_bytes = f.read()
     xml_bytes = bytes(bytearray(xml_bytes, encoding='utf-8'))
     transformer = ct.TCfdi33Detail()
     result_columns = transformer.to_columns_from_bytes(xml_bytes)
     self.assertFalse(result_columns is None)
     self.assertTrue(len(result_columns) == 1026)
     self.assertTrue(len(result_columns[0]) == 33)
コード例 #2
0
 def test_cfdi33_detail_get_column_names_ok(self):
     transformer = ct.TCfdi33Detail()
     result_columns = transformer.get_column_names()
     self.assertFalse(result_columns is None)
     self.assertTrue(len(result_columns) == 33)
コード例 #3
0
 def test_cfdi33_detail_01_from_file_ok(self):
     path_xml = "./tests/Resources/0B7B5AA2-2443-49A2-810D-C0A9A813F8EF.xml"
     transformer = ct.TCfdi33Detail()
     result_columns = transformer.to_columns_from_file(path_xml)
     self.assertTrue(len(result_columns) == 1026)
     self.assertTrue(len(result_columns[0]) == 33)