Description
Replace or observe parts of Python code during tests with mocks, stubs, and spies. It helps developers isolate behavior, verify interactions, and test code that would otherwise call slow or external services.
This is a testing library. Mocking should stay close to real behavior, because overly broad test doubles can make tests pass while production integrations still fail.