So back to
spec and why its important:
Basically when you create a MagicMock, you have an object which is not bounded to any interface. This makes testing easy, but on the other hand, your code does use interfaces and they do change over time.
Here is a quick example:
Lets say I'm using a class called
HashAPI which provides hashing services and exposes the following interface:
def create_hash(self, key):