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"])
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)
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)
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)
def test_parse_simple(self): data = pynabsb.parse_sb_csv(self.csvpath) self.assertEquals(4, len(data))