Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
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.