test_gchr.py 762 B

12345678910111213141516171819
  1. import unittest
  2. from gcstruct.gchr import GCHR
  3. class TestGchr(unittest.TestCase):
  4. base_dir_1: str = "C:\\Projekte\\GCHR2_Testdaten\\Kunden\\Altermann"
  5. base_dir_2: str = "C:\\Projekte\\GCHR2_Testdaten\\Kunden\\Koenig-und-Partner"
  6. def test_single_booking_files(self):
  7. gchr = GCHR(self.base_dir_1)
  8. self.assertEqual(len(gchr.account_bookings), 1)
  9. self.assertEqual(gchr.account_bookings[0].name, "GuV_Bilanz_Salden.csv")
  10. def test_multiple_booking_files(self):
  11. gchr = GCHR(self.base_dir_2)
  12. self.assertEqual(len(gchr.account_bookings), 2)
  13. self.assertEqual(gchr.account_bookings[0].name, "GuV_Bilanz_Salden.csv")
  14. self.assertEqual(gchr.account_bookings[1].name, "GuV_Bilanz_Salden_deop03.csv")