Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Mocks, Dummies, Stubs & Spies

EuroPython Conference via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the world of testing doubles in Python through this 25-minute EuroPython Conference talk. Dive deep into mocks, fakes, dummies, stubs, and spies, understanding their differences and appropriate use cases. Learn how to effectively isolate dependencies in your tests using unittest.mock, including new features in Python 3.7. Gain insights from the writings of Gerard Meszaros and Martin Fowler, and discover advanced techniques to shape mock objects for different functional behaviors. Suitable for both beginners and intermediate developers, this talk covers the importance of doubles, main qualities of a double, an overview of unittest.mock, and detailed explanations of various testing doubles. Conclude with practical takeaways and a Q&A session to enhance your Python testing skills.

Syllabus

Intro
Why do we need stubs
How to create stubs
Testing double
Creating mocks
Magic methods
Mock Interactions
Spec
Mock
Seal
spies
wrap scene
take away
deepfried Mars bar
Sentinels
Patch
Using Mocks
Naming Mocks
Quiz

Taught by

EuroPython Conference

Reviews

Start your review of Mocks, Dummies, Stubs & Spies

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.