def test_nomina11_01_from_bytes_ok(self): path_xml = "./tests/Resources/nomina11_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.TNomina11() result_columns = transformer.to_columns_from_bytes(xml_bytes) self.assertFalse(result_columns is None) self.assertTrue(len(result_columns) == 9) self.assertTrue(len(result_columns[0]) == 67)
def test_nomina11_get_column_names_ok(self): transformer = ct.TNomina11() result_columns = transformer.get_column_names() self.assertFalse(result_columns is None) self.assertTrue(len(result_columns) == 67)
def test_nomina11_01_from_file_ok(self): path_xml = "./tests/Resources/nomina11_01.xml" transformer = ct.TNomina11() result_columns = transformer.to_columns_from_file(path_xml) self.assertTrue(len(result_columns) == 9) self.assertTrue(len(result_columns[0]) == 67)