test_winmnt.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. '''
  2. Created on Jan 29, 2020 @author: deeejas
  3. '''
  4. import unittest
  5. from winmentor import info_anaf
  6. from winmentor.dbread import WinMentor
  7. from winmentor.mentorutils import Mentorutils
  8. class Test(unittest.TestCase):
  9. mentor = WinMentor()
  10. utils = Mentorutils()
  11. @unittest.skip('reason')
  12. def test_check_list(self):
  13. info_anaf.check_list('lista_cf.txt')
  14. def test_utils(self):
  15. headers = ['Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet', 'Prescurtat', 'Obs']
  16. n_headers = ['Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet', 'Prescurtat', 'Obs',
  17. 'TurnO', 'Result', 'divid', 'divid_current', 'spons', 'month']
  18. mentor = WinMentor()
  19. utils = Mentorutils()
  20. office = mentor.filtered_firmlist('/firme.db', headers=headers)
  21. utils.gen_turnover('./generated_files/turn_over', 'to', office, m_month='2019_12', n_headers=n_headers)
  22. def test_get_bank_accounts(self):
  23. for account in self.mentor.get_bank_accounts('WEBS'):
  24. # if account[2].startswith(' '):
  25. print(account)
  26. def test_get_oblig(self):
  27. head = ['Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet', 'Prescurtat', 'Admin', 'AdminP', 'RCNP', 'Obs']
  28. firm_list = list(self.mentor.filtered_firmlist(head))
  29. print(self.mentor.get_oblig('CHRYPRI/2023_02'))
  30. if __name__ == "__main__":
  31. unittest.main()