From 8e4ee027eb94ebad6300667744e4553fd0557d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 22 May 2024 09:20:01 +0200 Subject: [PATCH] Do not test network client in unittest The services are not reliable enough to be tested as unittest. Closes #13264 (grafted from 0c4d2eb959e66e5e48b27ea22f8c856eb7b419e2) --HG-- branch : 7.0 --- modules/account_es_sii/tests/test_module.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/modules/account_es_sii/tests/test_module.py b/modules/account_es_sii/tests/test_module.py index ade6a40cfa..189b0e11b2 100644 --- a/modules/account_es_sii/tests/test_module.py +++ b/modules/account_es_sii/tests/test_module.py @@ -4,7 +4,6 @@ import datetime 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 @@ -582,25 +581,5 @@ class AccountEsSiiTestCase(ModuleTestCase): 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