Michael Foord mock is a Python testing library. It has the goal of making mocking in tests brain dead simple! mock provides the Mock class and the patch decorator for safely patching out the objects you are mocking in your tests. This talk will cover standard mocking patterns. We'll also look at some of the newer features in the latest release, including support for mocking magic methods.
PyCon is an activity of the Python Software Foundation, a 501c3 non-profit organization. To support future conferences, please donate to the Foundation at www.python.org/psf/donations . Video and audio material from PyCon are licensed under the Creative Commons CC-BY-NC-SA license . This means you can incorporate excerpts or entire recordings in your own non-commercial projects, as long as you credit the speaker and you CC-license the finished project.