Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Dive into the world of unit testing, mocks, and patches in this 28-minute conference talk from EuroPython 2017. Learn the fundamentals of unit testing, explore common use cases, and discover best practices for working with mocks and patches. Understand the benefits of using mocks over dummy classes, and master the art of creating effective mocks using spec_set and spec to prevent interface-related issues. Gain insights into when and how to use patches, including side effects, patch properties, and environment variables. Avoid common pitfalls and mistakes in mock and patch implementation to ensure robust and reliable unit tests. Perfect for beginners, this talk also offers valuable tips for experienced developers looking to refine their testing skills.
Syllabus
Maciej Polańczyk - Mock it right! A beginner’s guide to world of tests and mocks.
Taught by
EuroPython Conference