diff options
| author | Laurent Smet <las@odoo.com> | 2020-07-14 08:15:26 +0000 |
|---|---|---|
| committer | Laurent Smet <las@odoo.com> | 2020-07-16 07:25:52 +0000 |
| commit | 85e187ebb533f09875de2974d5da136bd1971c9e (patch) | |
| tree | 404405f797fa27aa4c1871fc73777721a24366f7 /addons/payment_authorize | |
| parent | d421934ff851f86dc797b04028e7fb45d0193790 (diff) | |
[IMP] payment(_*): Remove dependency to AccountTestCommon
l10n runbot builds are all failing when running at least one test depending of AccountTestCommon because it:
- doesn't create a sandboxed testing environnement to manage the multi-currency, multi-company, the default company's currency, the exchange rates...
- doesn't setup a testing user then all tests are done using the superuser.
- doesn't provide a fully setup chart of accounts: exchange difference journal is not set, accounts have bad types, etc...
- is run sometimes at-install.
--task: 2296213
Diffstat (limited to 'addons/payment_authorize')
| -rw-r--r-- | addons/payment_authorize/tests/test_authorize.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/addons/payment_authorize/tests/test_authorize.py b/addons/payment_authorize/tests/test_authorize.py index d5b3ce98ef5..af9eda6b8fc 100644 --- a/addons/payment_authorize/tests/test_authorize.py +++ b/addons/payment_authorize/tests/test_authorize.py @@ -14,13 +14,14 @@ from odoo.tools import mute_logger @odoo.tests.tagged('post_install', '-at_install') class AuthorizeCommon(PaymentAcquirerCommon): - def setUp(self): - super(AuthorizeCommon, self).setUp() + @classmethod + def setUpClass(cls, chart_template_ref=None): + super().setUpClass(chart_template_ref=chart_template_ref) # authorize only support USD in test environment - self.currency_usd = self.env['res.currency'].search([('name', '=', 'USD')], limit=1)[0] + cls.currency_usd = cls.env['res.currency'].search([('name', '=', 'USD')], limit=1)[0] # get the authorize account - self.authorize = self.env.ref('payment.payment_acquirer_authorize') - self.authorize.write({ + cls.authorize = cls.env.ref('payment.payment_acquirer_authorize') + cls.authorize.write({ 'authorize_login': 'dummy', 'authorize_transaction_key': 'dummy', 'authorize_signature_key': '00000000', |
