Tests that use mocks tend to be more coupled to the implementation details of the codebase. That’s because mock tests verify the interactions between things: did we call shutil.copy with the right arguments? This coupling between code and test tends to make tests more brittle, in our experience. Overuse of mocks leads to complicated test suites that fail to explain the code.1675 ↱
Architecture Patterns with Python
Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices
Harry Percival, Bob Gregory