Several times in the previous chapters, we've run across cases where we needed to go out of our way to make sure that units didn't contaminate each others' tests. Now we're going to look at a formalization of how to handle those situations—mock objects—and also at a specific mock object toolkit called Python Mocker.
In this chapter, we shall:
So let's get on with it!
For the first time, we're using a tool that isn't included in the standard Python distribution. That means that we need to download and install it.