The Real Python Podcast cover image

Overcoming Testing Obstacles With Python's Mock Object Library

The Real Python Podcast

00:00

How patch() Replaces Imports in Tests

Christopher Trudeau explains patch's import-target string behavior and demonstrates replacing imported functions for tests.

Play episode from 15:32
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app