Sergi Almacellas Abellana pushed to branch branch/default at Tryton / Tryton
Commits: c417ed47 by Sergi Almacellas Abellana at 2023-05-17T11:26:13+02:00 Update SII wsdl location Closes #12276 - - - - - 2 changed files: - modules/account_es_sii/account.py - modules/account_es_sii/tests/test_module.py Changes: ===================================== modules/account_es_sii/account.py ===================================== @@ -34,8 +34,8 @@ # XXX: URLs for basque country and navarra should be added ] WS_URL = { - 'aeat': ('https://www2.agenciatributaria.gob.es/static_files/' - 'common/internet/dep/aplicaciones/es/aeat/ssii_1_1/fact/ws/'), + 'aeat': ('https://www2.agenciatributaria.gob.es/static_files/common/' + 'internet/dep/aplicaciones/es/aeat/ssii_1_1_bis/fact/ws/'), 'guipuzkoa': ( 'https://egoitza.gipuzkoa.eus/ogasuna/sii/ficheros/v1.1/'), } ===================================== modules/account_es_sii/tests/test_module.py ===================================== @@ -4,6 +4,7 @@ from decimal import Decimal from trytond.modules.account.tests import create_chart, get_fiscalyear +from trytond.modules.account_es_sii.account import SII_URL from trytond.modules.account_invoice.tests import set_invoice_sequences from trytond.modules.company.tests import create_company, set_company from trytond.modules.currency.tests import add_currency_rate, create_currency @@ -527,5 +528,25 @@ self.assertEqual(sii_invoice, []) + @with_transaction() + def test_get_client(self): + "Test client can be initialized for all environments" + pool = Pool() + Config = pool.get('account.configuration') + Credential = pool.get('account.credential.sii') + + company = create_company() + with set_company(company): + config = Config(1) + for key, _ in SII_URL: + if not key: + continue + for environment in ['staging', 'production']: + config.es_sii_url = key + config.es_sii_environment = environment + config.save() + client = Credential.get_client('SuministroFactEmitidas') + self.assertTrue(client) + del ModuleTestCase View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/commit/c417ed476b4349adb06081fe8d8f2270ba05875b -- View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/commit/c417ed476b4349adb06081fe8d8f2270ba05875b You're receiving this email because of your account on foss.heptapod.net.