Y
Hacker News
new
|
ask
|
show
|
jobs
by
Too
1323 days ago
The MagicMock class from unittest package does what you want.
I have a hard time understanding any use case outside of such mocking.