Disable check access when account payment tests write on readonly fields
This commit is contained in:
@@ -98,7 +98,7 @@ Checkout the payment::
|
||||
|
||||
>>> Payment.write([payment.id], {
|
||||
... 'braintree_nonce': Nonces.Transactable,
|
||||
... }, config.context)
|
||||
... }, {**config.context, '_check_access': False})
|
||||
|
||||
Process the payment::
|
||||
|
||||
@@ -132,7 +132,7 @@ Create a customer::
|
||||
>>> 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 @@ Create payment to settle::
|
||||
|
||||
>>> Payment.write([payment.id], {
|
||||
... 'braintree_nonce': Nonces.Transactable,
|
||||
... }, config.context)
|
||||
... }, {**config.context, '_check_access': False})
|
||||
|
||||
>>> process_payment = payment.click('process_wizard')
|
||||
>>> payment.state
|
||||
|
||||
@@ -103,7 +103,7 @@ Checkout the payment::
|
||||
... '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 @@ Create failing payment::
|
||||
... '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 @@ Checkout the customer::
|
||||
... },
|
||||
... )
|
||||
>>> 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 @@ Checkout the capture payment::
|
||||
... )
|
||||
>>> Payment.write([payment.id], {
|
||||
... 'stripe_token': token.id,
|
||||
... }, config.context)
|
||||
... }, {**config.context, '_check_access': False})
|
||||
|
||||
Process the capture payment::
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ Create fully disputed payment::
|
||||
... '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 @@ Create partial disputed payment::
|
||||
... '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 @@ Create won disputed payment::
|
||||
... '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
|
||||
|
||||
@@ -61,7 +61,8 @@ Create a customer::
|
||||
... },
|
||||
... )
|
||||
>>> 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 @@ Create a second customer with same card::
|
||||
... },
|
||||
... )
|
||||
>>> 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::
|
||||
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ Checkout the payment::
|
||||
>>> Payment.write([payment.id], {
|
||||
... 'stripe_token': token.id,
|
||||
... 'stripe_chargeable': True,
|
||||
... }, config.context)
|
||||
... }, {**config.context, '_check_access': False})
|
||||
|
||||
Process the payment::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user