In Python we often use the
mock library to do dependency injection for
tests. Recently I came across a really confounding edge case that can be easily
avoided if you know about it.
Mock intro redux
(Skip this section if you're already familiar with
Let's say we have a …