Bob Belderbos: How to Tell if Your Python Mock Is Actually Working (opens in new tab)
A test that passes because the real API returned an error is not a passing test. Here's how to verify your mock is intercepting, and fix it when it isn't.
Read the original article