Skip to content

Commit 683591c

Browse files
authored
Merge pull request #367 from mollie/342-testmode
Pass True instead of 'true' for testmode when posting using oauth_client
2 parents 4d5850f + 4c96a0f commit 683591c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mollie/api/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def _get_testmode(self, data, params, http_method):
201201
if http_method == "GET":
202202
params["testmode"] = params.get("testmode") or "true"
203203
elif not data or "testmode" not in data:
204-
data["testmode"] = params.get("testmode") or "true"
204+
data["testmode"] = params.get("testmode") or True
205205

206206
# Delete from the params since it's not a valid parameter when the request is not GET
207207
params.pop("testmode", None)

tests/test_api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ def test_update_customer_bad_request(client, response):
536536
"testmode,params,http_method,expected",
537537
[
538538
(True, {}, "GET", ({}, {"testmode": "true"})),
539-
(True, {}, "POST", ({"testmode": "true"}, {})),
539+
(True, {}, "POST", ({"testmode": True}, {})),
540540
(False, {"testmode": "true"}, "GET", ({}, {"testmode": "true"})),
541541
(False, {"testmode": "true"}, "POST", ({"testmode": "true"}, {})),
542542
(False, {"invalid": "something"}, "POST", ({}, {"invalid": "something"})),

0 commit comments

Comments
 (0)