Great article by @hynek about testing. Instead of mocking an external dependency, define your own interface, and mock that instead. It's one of those good testing hygiene practices that makes your production code better.
---
RT @hynek
Ever wondered what to mock in your tests?
You’ve heard of “Don’t Mock What You Don’t Own”, but it made no sense to you?
I’ve written something just for you: https://hynek.me/articles/what-to-mock-in-5-mins/
https://twitter.com/hynek/status/1539196675797000192