'''Created Dec 6, 2021 Levi''' import unittest from anafapi.anafapi import anafAPI # from winmentor import Mentorutils # utils = Mentorutils() # print(utils.gen_txt()) class Test(unittest.TestCase): api = anafAPI() def test_get_rep(self): rep = self.api.get_rep(cui='17259191', year='2020') print(rep[0]) def test_get_vat(self): print(self.api.get_vat('28298293')) def test_get_cult(self): print(self.api.get_cult('29422330')) def test_to_excel_rep(self): self.api.to_excel('to_rep', cui=['28298293'], func=self.api.get_rep, range_='2015-2020') self.api.open() def test_to_excel_vat(self): self.api.to_excel('to_vat', cui=['28298293'], 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() def test_process_rep(self): print(self.api.process_resp()) if __name__ == "__main__": unittest.main() # Test().test_get_vat() # Test().test_process_rep()