Esempio n. 1
0
    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))
Esempio n. 2
0
    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)
Esempio n. 3
0
    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))
Esempio n. 4
0
    def test_read_xml(self):
        filepath = self.BASE_PATH + "/mockups/concessionario.xml"
        processor = TextProcessor()
        processor.read_xml(filepath)

        processor.modify_xml(filepath)
Esempio n. 5
0
 def test_yalm_reader(self):
     filepath = self.BASE_PATH + "/mockups/concessionario.yml"
     processor = TextProcessor()
     processor.read_yaml(filepath)
Esempio n. 6
0
 def test_json_reader(self):
     filepath = self.BASE_PATH + "/mockups/concessionario.json"
     processor = TextProcessor()
     processor.read_json(filepath)
Esempio n. 7
0
 def test_csv_read(self):
     filepath = self.BASE_PATH + "/mockups/concessionario.csv"
     processor = TextProcessor()
     processor.read_csv(filepath)