details:   https://code.tryton.org/tryton/commit/37c09de48464
branch:    default
user:      Cédric Krier <[email protected]>
date:      Sat Sep 19 15:34:10 2026 +0200
description:
        Disable check access when account payment tests write on readonly fields
diffstat:

 modules/account_payment_braintree/tests/scenario_account_payment_braintree.rst 
         |  6 +++---
 modules/account_payment_stripe/tests/scenario_account_payment_stripe.rst       
         |  9 +++++----
 
modules/account_payment_stripe/tests/scenario_account_payment_stripe_dispute.rst
        |  6 +++---
 
modules/account_payment_stripe/tests/scenario_account_payment_stripe_identical.rst
      |  6 ++++--
 
modules/account_payment_stripe/tests/scenario_account_payment_stripe_refund_failure.rst
 |  2 +-
 5 files changed, 16 insertions(+), 13 deletions(-)

diffs (135 lines):

diff -r 6e5ba4eba1fe -r 37c09de48464 
modules/account_payment_braintree/tests/scenario_account_payment_braintree.rst
--- 
a/modules/account_payment_braintree/tests/scenario_account_payment_braintree.rst
    Tue Sep 08 10:05:31 2026 +0200
+++ 
b/modules/account_payment_braintree/tests/scenario_account_payment_braintree.rst
    Sat Sep 19 15:34:10 2026 +0200
@@ -98,7 +98,7 @@
 
     >>> Payment.write([payment.id], {
     ...     'braintree_nonce': Nonces.Transactable,
-    ...     }, config.context)
+    ...     }, {**config.context, '_check_access': False})
 
 Process the payment::
 
@@ -132,7 +132,7 @@
     >>> braintree_customer.save()
     >>> Customer.write([braintree_customer.id], {
     ...     'braintree_nonce': Nonces.Transactable,
-    ...     }, config.context)
+    ...     }, {**config.context, '_check_access': False})
 
 Run cron::
 
@@ -206,7 +206,7 @@
 
     >>> Payment.write([payment.id], {
     ...     'braintree_nonce': Nonces.Transactable,
-    ...     }, config.context)
+    ...     }, {**config.context, '_check_access': False})
 
     >>> process_payment = payment.click('process_wizard')
     >>> payment.state
diff -r 6e5ba4eba1fe -r 37c09de48464 
modules/account_payment_stripe/tests/scenario_account_payment_stripe.rst
--- a/modules/account_payment_stripe/tests/scenario_account_payment_stripe.rst  
Tue Sep 08 10:05:31 2026 +0200
+++ b/modules/account_payment_stripe/tests/scenario_account_payment_stripe.rst  
Sat Sep 19 15:34:10 2026 +0200
@@ -103,7 +103,7 @@
     ...     'stripe_token': token.id,
     ...     'stripe_chargeable': True,
     ...     'stripe_payment_intent_id': None,  # Remove intent from checkout
-    ...     }, config.context)
+    ...     }, {**config.context, '_check_access': False})
 
 Process the payment::
 
@@ -146,7 +146,7 @@
     ...     'stripe_token': token.id,
     ...     'stripe_chargeable': True,
     ...     'stripe_payment_intent_id': None,  # Remove intent from checkout
-    ...     }, config.context)
+    ...     }, {**config.context, '_check_access': False})
     >>> process_payment = payment.click('process_wizard')
     >>> payment.state
     'failed'
@@ -175,7 +175,8 @@
     ...         },
     ...     )
     >>> Customer.write(
-    ...     [stripe_customer.id], {'stripe_token': token.id}, config.context)
+    ...     [stripe_customer.id], {'stripe_token': token.id},
+    ...     {**config.context, '_check_access': False})
 
 Run cron::
 
@@ -277,7 +278,7 @@
     ...     )
     >>> Payment.write([payment.id], {
     ...     'stripe_token': token.id,
-    ...     }, config.context)
+    ...     }, {**config.context, '_check_access': False})
 
 Process the capture payment::
 
diff -r 6e5ba4eba1fe -r 37c09de48464 
modules/account_payment_stripe/tests/scenario_account_payment_stripe_dispute.rst
--- 
a/modules/account_payment_stripe/tests/scenario_account_payment_stripe_dispute.rst
  Tue Sep 08 10:05:31 2026 +0200
+++ 
b/modules/account_payment_stripe/tests/scenario_account_payment_stripe_dispute.rst
  Sat Sep 19 15:34:10 2026 +0200
@@ -88,7 +88,7 @@
     ...     'stripe_token': token.id,
     ...     'stripe_chargeable': True,
     ...     'stripe_payment_intent_id': None,  # Remove intent from checkout
-    ...     }, config.context)
+    ...     }, {**config.context, '_check_access': False})
 
     >>> process_payment = payment.click('process_wizard')
     >>> payment.state
@@ -182,7 +182,7 @@
     ...     'stripe_token': token.id,
     ...     'stripe_chargeable': True,
     ...     'stripe_payment_intent_id': None,  # Remove intent from checkout
-    ...     }, config.context)
+    ...     }, {**config.context, '_check_access': False})
 
     >>> process_payment = payment.click('process_wizard')
     >>> payment.state
@@ -254,7 +254,7 @@
     ...     'stripe_token': token.id,
     ...     'stripe_chargeable': True,
     ...     'stripe_payment_intent_id': None,  # Remove intent from checkout
-    ...     }, config.context)
+    ...     }, {**config.context, '_check_access': False})
 
     >>> process_payment = payment.click('process_wizard')
     >>> payment.state
diff -r 6e5ba4eba1fe -r 37c09de48464 
modules/account_payment_stripe/tests/scenario_account_payment_stripe_identical.rst
--- 
a/modules/account_payment_stripe/tests/scenario_account_payment_stripe_identical.rst
        Tue Sep 08 10:05:31 2026 +0200
+++ 
b/modules/account_payment_stripe/tests/scenario_account_payment_stripe_identical.rst
        Sat Sep 19 15:34:10 2026 +0200
@@ -61,7 +61,8 @@
     ...         },
     ...     )
     >>> StripeCustomer.write(
-    ...     [stripe_customer1.id], {'stripe_token': token.id}, config.context)
+    ...     [stripe_customer1.id], {'stripe_token': token.id},
+    ...     {**config.context, '_check_access': False})
 
 Run cron::
 
@@ -86,7 +87,8 @@
     ...         },
     ...     )
     >>> StripeCustomer.write(
-    ...     [stripe_customer2.id], {'stripe_token': token.id}, config.context)
+    ...     [stripe_customer2.id], {'stripe_token': token.id},
+    ...     {**config.context, '_check_access': False})
 
 Run cron::
 
diff -r 6e5ba4eba1fe -r 37c09de48464 
modules/account_payment_stripe/tests/scenario_account_payment_stripe_refund_failure.rst
--- 
a/modules/account_payment_stripe/tests/scenario_account_payment_stripe_refund_failure.rst
   Tue Sep 08 10:05:31 2026 +0200
+++ 
b/modules/account_payment_stripe/tests/scenario_account_payment_stripe_refund_failure.rst
   Sat Sep 19 15:34:10 2026 +0200
@@ -86,7 +86,7 @@
     >>> Payment.write([payment.id], {
     ...     'stripe_token': token.id,
     ...     'stripe_chargeable': True,
-    ...     }, config.context)
+    ...     }, {**config.context, '_check_access': False})
 
 Process the payment::
 

Reply via email to