Common Mocking Problems & How To Avoid Them (+ Best Practices)
As a Python developer, you may have written non-deterministic code or code that has external dependencies.
One of the simplest ways to test this type of code is mocking.
But what happens when you use too much mocking? How does it affect code refactoring?
What if you change the underlying storage layer or ORM (say SQL to NoSQL), does it break the mocks? What about changes to implementation logic?
How do you capture changes in the external system if you’re using mocking? (e.g. API provider changes schema).