def test_sax_cfdi33_get_column_names_ok(self): transformer = ct.TSaxCfdi33() result_columns = transformer.get_column_names() self.assertFalse(result_columns is None) self.assertTrue(len(result_columns) == 38) self.assertTrue(result_columns[4] == 'NOCERTIFICADO') self.assertFalse(result_columns[17] == 'SERIE')
def test_sax_cfdi33_01_from_file_ok(self): path_xml = './tests/Resources/cfdi33_01.xml' transformer = ct.TSaxCfdi33() result_columns = transformer.to_columns_from_file(path_xml) self.assertFalse(result_columns is None) self.assertTrue(len(result_columns) == 1) self.assertTrue(len(result_columns[0]) == 38) self.assertTrue(result_columns[0][1] == 'VF')
def test_sax_cfdi33(self): path_xml = './tests/Resources/cfdi33_nomina_multiple_tfd.xml' transformer = ct.TSaxCfdi33() result_columns = transformer.to_columns_from_file(path_xml) self.assertFalse(result_columns is None) self.assertTrue(len(result_columns) == 2) self.assertTrue(len(result_columns[0]) == 38) self.assertTrue(result_columns[0][34] == 'D237D7D1-CFAD-492A-89C1-BF3E6CED9E59') self.assertTrue(result_columns[1][34] == '1931BBAD-DE49-4703-8F1A-9F4B663495D5')
def test_sax_cfdi33_addenda_from_file_ok(self): path_xml = './tests/Resources/cfdi33_addenda.xml' transformer = ct.TSaxCfdi33() result_columns = transformer.to_columns_from_file(path_xml) self.assertFalse(result_columns is None) self.assertTrue(len(result_columns) == 1) self.assertTrue(len(result_columns[0]) == 38) self.assertTrue(transformer.has_addendas()) self.assertTrue(transformer.get_addendas() == 'NombreAdenda, xmlAtt')