In OAuth and access-token requests, you can specify testmode=true to perform API requests during the development phase. Currently this needs to be done on a per-request basis:
Of course this quickly gets messy when your API requests are all over you application, and you need to adjust all of your code to enable/disable testmode for each call. We want to support enabling this on the client level, e.g:
from mollie.api.client import Client
mollie_client = Client()
mollie_client.set_access_token("access_blah")
mollie.client.set_testmode(True) # or False
data = {
"name": "Customer A",
"email": "customer@example.org",
}
customer = mollie_client.customers.create(data) # Now this will send the API request with testmode enabled
In OAuth and access-token requests, you can specify
testmode=true
to perform API requests during the development phase. Currently this needs to be done on a per-request basis:Of course this quickly gets messy when your API requests are all over you application, and you need to adjust all of your code to enable/disable testmode for each call. We want to support enabling this on the client level, e.g: