1 Matching Annotations
- Dec 2015
The basic principle is that you patch where an object is looked up, which is not necessarily the same place as where it is defined. A couple of examples will help to clarify this.
This caught me out, as it did for a lot of other people apparently, see also this useful post about Python Mock gotchas: http://alexmarandon.com/articles/python_mock_gotchas/