summaryrefslogtreecommitdiff
path: root/addons/payment_adyen
diff options
context:
space:
mode:
authorLaurent Smet <las@odoo.com>2020-07-14 08:15:26 +0000
committerLaurent Smet <las@odoo.com>2020-07-16 07:25:52 +0000
commit85e187ebb533f09875de2974d5da136bd1971c9e (patch)
tree404405f797fa27aa4c1871fc73777721a24366f7 /addons/payment_adyen
parentd421934ff851f86dc797b04028e7fb45d0193790 (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_adyen')
-rw-r--r--addons/payment_adyen/tests/test_adyen.py37
1 files changed, 19 insertions, 18 deletions
diff --git a/addons/payment_adyen/tests/test_adyen.py b/addons/payment_adyen/tests/test_adyen.py
index bb02532a06c..1d792ccc089 100644
--- a/addons/payment_adyen/tests/test_adyen.py
+++ b/addons/payment_adyen/tests/test_adyen.py
@@ -10,26 +10,27 @@ import odoo.tests
class AdyenCommon(PaymentAcquirerCommon):
- def setUp(self):
- super(AdyenCommon, self).setUp()
+ @classmethod
+ def setUpClass(cls, chart_template_ref=None):
+ super().setUpClass(chart_template_ref=chart_template_ref)
# some CC (always use expiration date 06 / 2016, cvc 737, cid 7373 (amex))
- self.amex = (('370000000000002', '7373'))
- self.dinersclub = (('36006666333344', '737'))
- self.discover = (('6011601160116611', '737'), ('644564456445644', '737'))
- self.jcb = (('3530111333300000', '737'))
- self.mastercard = (('5555444433331111', '737'), ('5555555555554444', '737'))
- self.visa = (('4111 1111 1111 1111', '737'), ('4444333322221111', '737'))
- self.mcdebit = (('5500000000000004', '737'))
- self.visadebit = (('4400000000000008', '737'))
- self.maestro = (('6731012345678906', '737'))
- self.laser = (('630495060000000000', '737'))
- self.hipercard = (('6062828888666688', '737'))
- self.dsmastercard = (('521234567890 1234', '737', 'user', 'password'))
- self.dsvisa = (('4212345678901237', '737', 'user', 'password'))
- self.mistercash = (('6703444444444449', None, 'user', 'password'))
- self.adyen = self.env.ref('payment.payment_acquirer_adyen')
- self.adyen.write({
+ cls.amex = (('370000000000002', '7373'))
+ cls.dinersclub = (('36006666333344', '737'))
+ cls.discover = (('6011601160116611', '737'), ('644564456445644', '737'))
+ cls.jcb = (('3530111333300000', '737'))
+ cls.mastercard = (('5555444433331111', '737'), ('5555555555554444', '737'))
+ cls.visa = (('4111 1111 1111 1111', '737'), ('4444333322221111', '737'))
+ cls.mcdebit = (('5500000000000004', '737'))
+ cls.visadebit = (('4400000000000008', '737'))
+ cls.maestro = (('6731012345678906', '737'))
+ cls.laser = (('630495060000000000', '737'))
+ cls.hipercard = (('6062828888666688', '737'))
+ cls.dsmastercard = (('521234567890 1234', '737', 'user', 'password'))
+ cls.dsvisa = (('4212345678901237', '737', 'user', 'password'))
+ cls.mistercash = (('6703444444444449', None, 'user', 'password'))
+ cls.adyen = cls.env.ref('payment.payment_acquirer_adyen')
+ cls.adyen.write({
'adyen_merchant_account': 'dummy',
'adyen_skin_code': 'dummy',
'adyen_skin_hmac_key': 'dummy',