Stop Using Mocks - for a While
Offered By: PyCon US via YouTube
Course Description
Overview
Explore a thought-provoking talk from PyCon US that challenges the conventional use of mocks in testing. Discover why classic testing approaches often fall short in real-world scenarios and learn alternative strategies for designing more maintainable and effective tests. Delve into patterns like "Functional Core, Imperative Shell" and Dependency Injection, and understand how hand-rolled fakes can serve as a superior alternative to mocking and patching. Gain insights on improving code design, creating more robust test suites, and achieving a healthy test pyramid. Through practical examples and a journey from sync APIs to building fake APIs, acquire valuable techniques to enhance your testing practices and overall code quality.
Syllabus
Introduction
The Heros Journey
Example Code
Sync to API
Mocks are Broken
Adapter Example
Build a Fake
Dependency Injection
Wrapping Up
Building a Fake API
Taught by
PyCon US
Related Courses
Intro to Python for Brand New ProgrammersPyCon US via YouTube Comprehending Comprehensions
PyCon US via YouTube Data Analysis with SQLite and Python
PyCon US via YouTube Build a Production Ready GraphQL API Using Python
PyCon US via YouTube Web Development With A Python-backed Frontend - Featuring HTMX and Tailwind
PyCon US via YouTube