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
This commit is contained in:
1 parent
12f6a3f9ac
commit
8e4ee027eb
1 file changed
-21
@@ -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
|
||||
Reference in new issue
Block a user