#Jonah Librach
1 messages · Page 1 of 1 (latest)
Yes, Stripe offers CLI and this is the setup guide: https://stripe.com/docs/stripe-cli
You may refer to the guide here for webhook testing via CLI: https://stripe.com/docs/stripe-cli/about-events
Thanks I'll check it out
I do have a stripe CLI, but it seems the events I do are connected to the server
How do I direct my python bindings to the locally running stripe machine
I've been running this stripe listen --forward-to localhost:80/stripe_webhooks, but commands still go to stripe's online API, no?
This command is to forward the webhook events to your local server. stripe trigger command will trigger the events to your account which will then forward to your local server: https://stripe.com/docs/cli/trigger
When I say connected to the server I mean Stripe's global server
Ya, that's what I've been doing, which is too slow
It just takes too long to run those tests unfortunately I can't wait 30 seconds for the test_clock to update
Triggering events via CLI will always create event on your account. Stripe CLI doesn't provide offline mocking objects or events
Mocking the integration can only be done within your own test system
Any tips for how to do this?
I'm afraid mocking events will not be possible with Stripe CLI as any operation requires real objects such as advancing the time with test clock