12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- '''
- Created on Jan 29, 2020 @author: deeejas
- '''
- import unittest
- import pandas as pd
- from winmentor import info_anaf
- from winmentor.dbread import WinMentor
- from winmentor.mentorutils import Mentorutils
- class Test(unittest.TestCase):
-
- mentor = WinMentor()
- utils = Mentorutils()
-
- @unittest.skip('reason')
- def test_check_list(self):
- info_anaf.check_list('lista_cf.txt')
-
- def test_utils(self):
- headers = ['Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet', 'Prescurtat', 'Obs']
- n_headers = ['Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet', 'Prescurtat', 'Obs',
- 'TurnO', 'Result', 'divid', 'divid_current', 'spons', 'month']
- mentor = WinMentor()
- utils = Mentorutils()
- office = mentor.filtered_firmlist('/firme.db', headers=headers)
- utils.gen_turnover('./generated_files/turn_over', 'to', office, m_month='2019_12', n_headers=n_headers)
-
- def test_get_bank_accounts(self):
- for account in self.mentor.get_bank_accounts('WEBS'):
- # if account[2].startswith(' '):
- print(account)
-
- def test_get_oblig(self):
- head = ['Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet', 'Prescurtat', 'Admin', 'AdminP', 'RCNP', 'Obs']
- # firm_list = list(self.mentor.filtered_firmlist(head))
- df_dict = self.mentor.get_oblig('CHRYPRI/2023_02')
- df = pd.DataFrame(df_dict)
- print(df.head(10))
-
- if __name__ == "__main__":
- unittest.main()
|