示例#1
0
文件: test.py 项目: mathlu/pynabsb
 def test_parse_contents(self):
     data = pynabsb.parse_sb_csv(self.csvpath)
     self.assertEquals("SKYDDAT BELOPP", data[0]["Payee"])
     self.assertEquals("2018-01-01", data[0]["Date"])
     self.assertEquals("-46,00", data[0]["Outflow"])
     self.assertEquals("", data[0]["Inflow"])
     self.assertEquals("", data[0]["Memo"])
示例#2
0
文件: test.py 项目: mathlu/pynabsb
    def test_qif(self):
        data = pynabsb.parse_sb_csv(self.csvpath)
        pynabsb.convert_sb_data_qif(data, self.outpath_qif)

        result = None
        with open(self.outpath_qif, "rb") as outfile:
            result = outfile.read()

        self.assertEquals(TESTQIF_RESULT, result)
示例#3
0
文件: test.py 项目: mathlu/pynabsb
    def test_conversion_date_filter(self):
        data = pynabsb.parse_sb_csv(self.csvpath)
        pynabsb.convert_sb_data(data, self.outpath, date_filter="2018-01-01")

        result = None
        with open(self.outpath, "rb") as outfile:
            result = outfile.read()

        self.assertEquals(TESTCSV_RESULT_DATEFILTER, result)
示例#4
0
文件: test.py 项目: mathlu/pynabsb
    def test_conversion(self):
        data = pynabsb.parse_sb_csv(self.csvpath)
        pynabsb.convert_sb_data(data, self.outpath)

        result = None
        with open(self.outpath, "rb") as outfile:
            result = outfile.read()

        self.assertEquals(TESTCSV_RESULT, result)
示例#5
0
文件: test.py 项目: mathlu/pynabsb
 def test_parse_simple(self):
     data = pynabsb.parse_sb_csv(self.csvpath)
     self.assertEquals(4, len(data))