From 4ef1cbf1bce8547986622461506fe1f5e1d9dffe Mon Sep 17 00:00:00 2001 From: Cristiano Betta Date: Fri, 27 Nov 2026 10:22:32 +0000 Subject: [PATCH] test: cover payment method detokenization Co-Authored-By: Claude Opus 5.5 --- tests/processing/test_payment_methods.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/processing/test_payment_methods.py b/tests/processing/test_payment_methods.py index a88a9610..fbaabb2a 100644 --- a/tests/processing/test_payment_methods.py +++ b/tests/processing/test_payment_methods.py @@ -95,3 +95,14 @@ def test_payment_service_tokens_are_reached(merchant): ), "payment_methods.payment_service_tokens.delete", ) + + +def test_detokenize_is_reached(merchant): + sdk = merchant.client + pm = sdk.payment_methods.create(request_body=fixtures.approving_card()) + + # 4xx is fine: the per-run merchant may have no public key, and the endpoint is rate limited. + reach.reaches( + lambda: sdk.payment_methods.detokenize(payment_method_id=pm.id), + "payment_methods.detokenize", + )