Live Online Classes in Design, Coding & AI — Small Classes, Free Retakes
The Most Addictive Python and SQL Courses
Overview
Google, IBM & Meta Certificates – 40% Off
One plan covers every Professional Certificate on Coursera.
Unlock All Certificates
Explore effective mocking techniques for Python unit testing in this conference talk from EuroPython 2016. Gain insights into the unittest.mock library, learn how to create and manipulate Mock objects, set up return values and side effects, and inspect mocks to examine test behavior. Discover common mocking scenarios, including date/time, filesystem, and read-only properties. Understand when mocking is most beneficial and when to consider alternative approaches. While focusing primarily on unittest.mock, briefly examine other useful mocking libraries to enhance your testing toolkit.
Syllabus
Introduction
What is a Mock
Comparison Objects
Patch
Object
Taught by
EuroPython Conference