mockito
Test-object builders for Stripe API resources
November 12, 2020
Working with the Stripe API is unlike most anything else in the world of software development. Stripe’s documentation is outstanding. Their API is intuitive and the language specific clients are easy to use. Each Stripe account comes with a test environment that makes development and integration testing effortless. The stripe command line tool can be used for simple API queries, setting up authentication and testing of web hooks. On top of all that, there is stripe-mock, a local service with a near- complete implementation of the API that can be used for testing and development without requiring a network connection to the Stripe Test environment...mockito python stripe unit-testing
Testing Python with Mockito
November 10, 2020
A significant percentage of writing software is invoking other bits of software that may or may not be in your control. That sounds straightforward, after all most of this code doesn’t even really “do” anything. But as with most things in life, mistakes are made and thus small bugs find their way into your code. Testing is the obvious answer to this problem. Now before you climb your high horse and start pouring out the bucket of arguments on how good coders don’t need to write tests–and definitely not for simple code–, how testing takes too much time, that your boss won’t let you- or whatever other bad excuse (copied-from-some-Quora-answer-you-may-or-may-not-have-found-on-Google) you can bring up; here is why I think unit testing is valuable:..mockito python unit-testing