Beispiel #1
0
    def test__procesFile__EndesaAllOk(self):
        p = xlsparser.XLSParser()

        p.procesFile('./tests/data/test_endesa.xlsx')

        result = self.fromCSVtoList('output_endesa.csv')
        self.assertEqual(
            [['F3901N00000008', '26,24'], ['F3901N00000009', '27,88'],
             ['F3901N00000010', '21,71'], ['F3901N00000011', '30,25'],
             ['F3901N00000012', '25,31']], result)
Beispiel #2
0
    def test__procesFile__IberdrolaAllOk(self):
        p = xlsparser.XLSParser()

        p.procesFile('./tests/data/test_iberdrola.xlsx')

        result = self.fromCSVtoList('output_iberdrola.csv')
        self.assertEqual([['100000000000000001', '342,82'],
                          ['100000000000000002', '343,82'],
                          ['100000000000000003', '344,82'],
                          ['100000000000000004', '345,82']], result)
Beispiel #3
0
    def test__procesFile__EndesaSheetErr(self):
        p = xlsparser.XLSParser()

        with self.assertRaises(Exception):
            p.procesFile('./tests/data/test_endesa_err_sheetname.xlsx')
Beispiel #4
0
    def test__procesFile__IberdrolaColumnErr(self):
        p = xlsparser.XLSParser()

        with self.assertRaises(Exception):
            p.procesFile('./tests/data/test_iberdrola_err_columname.xlsx')