|
@@ -16,8 +16,8 @@ elif platform.system() == 'Windows':
|
|
|
|
|
|
class oauthTest(unittest.TestCase):
|
|
|
anoauth = Anafoauth(
|
|
|
- client_id='82e0a1c84f2973ec23cf7f6238bb0023e996dd82b9f3a162',
|
|
|
- client_secret='c227aa241f3bdf49f9c978a4a152926ee850ba64371f0023e996dd82b9f3a162',
|
|
|
+ client_id='16cbef8754bef0bcf015529353427e8a7e3ee71d56879565',
|
|
|
+ client_secret='c6aa66d89002f36461f93facd990e6bf5bc706e1df897e8a7e3ee71d56879565',
|
|
|
redirect_uri='https://www.anaf.ro/oauth2callback',
|
|
|
)
|
|
|
|
|
@@ -40,8 +40,8 @@ class oauthTest(unittest.TestCase):
|
|
|
|
|
|
class efactTest(unittest.TestCase):
|
|
|
efactoauth = Efactoauth(
|
|
|
- client_id='82e0a1c84f2973ec23cf7f6238bb0023e996dd82b9f3a162',
|
|
|
- client_secret='c227aa241f3bdf49f9c978a4a152926ee850ba64371f0023e996dd82b9f3a162',
|
|
|
+ client_id='16cbef8754bef0bcf015529353427e8a7e3ee71d56879565',
|
|
|
+ client_secret='c6aa66d89002f36461f93facd990e6bf5bc706e1df897e8a7e3ee71d56879565',
|
|
|
redirect_uri='https://www.anaf.ro/oauth2callback',
|
|
|
)
|
|
|
efactoauth.load_token_file(token_file_path.format('efact.json'))
|
|
@@ -93,6 +93,12 @@ class efactTest(unittest.TestCase):
|
|
|
print(latest)
|
|
|
# os.replace(latest, latest.replace('.xml'.lower(), '_booked.xml'))
|
|
|
|
|
|
+ def test_validate_invoice(self):
|
|
|
+ # print(os.listdir('c:/Users/DECEL/FACT1/MZK/2023.01.03/'))
|
|
|
+ # for file in os.listdir('c:/Users/DECEL/FACT1/MZK/2023.01.03/'):
|
|
|
+ # self.efactoauth.validate_invoice(os.path.join('c:/Users/DECEL/FACT1/MZK/2023.01.03/', file))
|
|
|
+ self.efactoauth.validate_invoice('c:/Users/DECEL/FACT1/MZK/2023.01.03/MZK2415.xml')
|
|
|
+
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
# unittest.main()
|