summaryrefslogtreecommitdiff
path: root/addons/payment_sips
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2020-04-14 06:40:30 +0000
committerThibault Delavallée <tde@odoo.com>2020-04-14 10:06:21 +0000
commit6b916937c8fe4e2abeea87bf8aeef0b5bd66aedd (patch)
treef8bd32b68eaa80b553ad77fc49921efbe5acf27f /addons/payment_sips
parentfe1d946887e3197696b3efe03663e24ff1ef4b8b (diff)
[FIX] payment_sips: propagate environment -> state variable renaming
Some bits of code still use old variable. Task ID 2237300 Closes PR #49462 closes odoo/odoo#49501 X-original-commit: 4d402e94cb18cf5cc7e89ba9a9c305d02542a7f9 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/payment_sips')
-rw-r--r--addons/payment_sips/tests/test_sips.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/addons/payment_sips/tests/test_sips.py b/addons/payment_sips/tests/test_sips.py
index 76b3c4f641e..3ab711f9eb1 100644
--- a/addons/payment_sips/tests/test_sips.py
+++ b/addons/payment_sips/tests/test_sips.py
@@ -9,9 +9,14 @@ class SipsTest(PaymentAcquirerCommon):
def setUp(self):
super().setUp()
self.sips = self.env.ref('payment.payment_acquirer_sips')
+ self.sips.write({
+ 'state': 'test',
+ 'sips_merchant_id': 'dummy_mid',
+ 'sips_secret': 'dummy_secret',
+ })
def test_10_sips_form_render(self):
- self.assertEqual(self.sips.environment, 'test', 'test without test environment')
+ self.assertEqual(self.sips.state, 'test', 'test without test environment')
# ----------------------------------------
# Test: button direct rendering
@@ -27,7 +32,7 @@ class SipsTest(PaymentAcquirerCommon):
self.sips.render('SO404', 100.0, self.currency_euro.id, values=self.buyer_values).decode('utf-8')
def test_20_sips_form_management(self):
- self.assertEqual(self.sips.environment, 'test', 'test without test environment')
+ self.assertEqual(self.sips.state, 'test', 'test without test environment')
# typical data posted by Sips after client has successfully paid
sips_post_data = {
@@ -93,7 +98,7 @@ class SipsTest(PaymentAcquirerCommon):
self.assertEqual(tx.state, 'cancel', 'Sips: erroneous validation did not put tx into error state')
def test_30_sips_badly_formatted_date(self):
- self.assertEqual(self.sips.environment, 'test', 'test without test environment')
+ self.assertEqual(self.sips.state, 'test', 'test without test environment')
# typical data posted by Sips after client has successfully paid
bad_date = '2020-04-08T06:15:59+56:00'