123456789101112131415161718192021222324252627282930313233343536 |
- '''Created Dec 6, 2021 Levi'''
- import unittest
- from winmentor.anafapi import anafAPI
- from winmentor import Mentorutils
- utils = Mentorutils()
- # print(utils.gen_txt())
- class Test(unittest.TestCase):
- api = anafAPI()
- def test_get_rep(self):
- print(self.api.get_rep(cui='17259191', year='2020')[1])
- def test_get_vat(self):
- print(self.api.get_vat('17259191'))
- def test_get_cult(self):
- print(self.api.get_cult('29422330'))
- def test_to_excel_rep(self):
- self.api.to_excel('to_rep', cui=['17259191'], func=self.api.get_rep, range_='2018-2019')
- self.api.open()
- def test_to_excel_vat(self):
- self.api.to_excel('to_vat', cui=utils.gen_txt(), func=self.api.get_vat)
- def test_to_excel_cult(self):
- self.api.to_excel('to_cult', cui=['29422330'], func=self.api.get_cult)
- self.api.open()
- if __name__ == "__main__":
- #import sys;sys.argv = ['', 'Test.testName']
- unittest.main()
|