„Patches are signs of failures“ – Michael Foord, the creator of Mock Python library
„Mocks couple your tests to the implementation details and interferes with refactoring.“ – Martin Fowler
This article shares 4 simple patterns for writing testable code, so you don’t have to use patches and complex mocks to try to test the otherwise untestable code. ( I deleted the previous post because the text was a bit misleading)
submitted by /u/gaeioran
[link] [comments]