def test_yalm_writer(self): self.filepath = self.BASE_PATH + "/mockups/nuovo_yaml.yml" processor = TextProcessor() to_parse = { "nome": "Silvia", "cognome": "Rossi", "admin": False, "mascote": 5, "figli": { "femmine": ["Clara", "Francesca"], "maschi": [] } } processor.write_yaml(self.filepath, to_parse) self.assertTrue(os.path.exists(filepath))
def test_create_xml_by_csv(self): filepath = self.BASE_PATH + "/mockups/concessionario.csv" processor = TextProcessor() processor.read_csv(filepath) self.filepath = self.BASE_PATH + "/mockups/concessionario_full.xml" processor.write_xml(self.filepath, processor.list_rows) processor.pretty_print(self.filepath)
def test_csv_writter(self): filepath = self.BASE_PATH + "/mockups/concessionario.csv" processor = TextProcessor() processor.read_csv(filepath) self.filepath = self.BASE_PATH + "/mockups/nuovo_csv.csv" processor.write_csv(self.filepath) self.assertTrue(os.path.exists(self.filepath))
def test_read_xml(self): filepath = self.BASE_PATH + "/mockups/concessionario.xml" processor = TextProcessor() processor.read_xml(filepath) processor.modify_xml(filepath)
def test_yalm_reader(self): filepath = self.BASE_PATH + "/mockups/concessionario.yml" processor = TextProcessor() processor.read_yaml(filepath)
def test_json_reader(self): filepath = self.BASE_PATH + "/mockups/concessionario.json" processor = TextProcessor() processor.read_json(filepath)
def test_csv_read(self): filepath = self.BASE_PATH + "/mockups/concessionario.csv" processor = TextProcessor() processor.read_csv(filepath)