Files
odoo_source/addons/payment_alipay/tests/common.py
T
Antoine Vandevenne (anv) c29d94a6e8 [IMP] payment_*: reuse the common reference in test data
closes odoo/odoo#84385

X-original-commit: 0482826b77939d326fd8519ba888aacd3afa2e99
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-11 11:40:23 +00:00

36 lines
1.3 KiB
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.payment.tests.common import PaymentCommon
class AlipayCommon(PaymentCommon):
@classmethod
def setUpClass(cls, chart_template_ref=None):
super().setUpClass(chart_template_ref=chart_template_ref)
cls.currency_yuan = cls._prepare_currency('CNY')
cls.alipay = cls._prepare_acquirer('alipay', update_values={
'alipay_merchant_partner_id': 'dummy',
'alipay_md5_signature_key': 'dummy',
'alipay_seller_email': 'dummy',
'fees_active': False, # Only activate fees in dedicated tests
})
# override defaults for helpers
cls.acquirer = cls.alipay
cls.currency = cls.currency_yuan
cls.notification_data = {
'currency': 'CNY',
'notify_id': '1234567890123456789012345678901234',
'notify_time': '2021-12-01 01:01:01',
'notify_type': 'trade_status_sync',
'out_trade_no': cls.reference,
'sign': '782b6d1015549f847e2ab27d1edb65c7',
'sign_type': 'MD5',
'total_fee': '1111.11',
'trade_no': '2021111111111111111111111111',
'trade_status': 'TRADE_FINISHED',
}