Mocking is a technique to help you test your code by replacing the pieces that don’t need to be tested with “mock” objects that behave in a similar way. For example, if you want to test a module that returns the weather from a web service, you can “mock” the web service so that it returns predictable results. Here is a three part video I’ve created with Michael Foord, author of the Python Mock library which will be included in Python 3.3.
A Gentle Introduction to Mock for Python (part 1 of 3 – 13min)
Why use Mock? (part 2 of 3 – 3.5min)
Mock and Django (part 3 of 3 – 38min)