Real Python
  • Start Here
  • Learn Python
    Python Tutorials →
    In-depth articles and video courses
    Learning Paths →
    Guided study plans for accelerated learning
    Quizzes & Exercises →
    Check your learning progress
    Browse Topics →
    Focus on a specific area or skill level
    Community Chat →
    Learn with other Pythonistas
    Office Hours →
    Live Q&A calls with Python experts
    Podcast →
    Hear what’s new in the world of Python
    Books →
    Round out your knowledge and learn offline
    Reference →
    Concise definitions for common Python terms
    Code Mentor →Beta
    Personalized code assistance & learning tools
    Unlock All Content →
  • More
    Learner Stories Python Newsletter Python Job Board Meet the Team Become a Tutorial Writer Become a Video Instructor
  • Search
/
  • Join
  • Sign‑In

Improve Your Tests With the Python Mock Object Library (Quiz)

Lee Gaines
Improve Your Tests With the Python Mock Object Library Lee Gaines 08:00
Recommended Tutorial Course Slides (.pdf) Sample Code (.zip) Ask a Question
  • Contents
  • Discussion

Become a Member to take the quiz.

Become a Member to join the conversation.

Course Contents

Overview
96%
    Improve Your Tests With the Python Mock Object Library (Overview) 01:08
    What Is Mocking? 01:59
    The Mock Library 00:43
    Mock Objects 03:22
    Lazy Attributes and Methods 02:40
    Assertions 05:02
    Associated Attributes 03:17
    Return Value (Part 1) 03:40
    Return Value (Part 2) 03:55
    unittest Example 05:34
    What Is a Side Effect? 01:45
    Side Effects: Setting Up 02:36
    Side Effects: Troubleshooting 02:39
    Side Effects: Testing 03:05
    Side Effects: Another Test 02:16
    Side Effects: Advanced Test (Part 1) 03:37
    Side Effects: Advanced Test (Part 2) 04:15
    Side Effects as an Iterable (Part 1) 02:33
    Side Effects as an Iterable (Part 2) 06:58
    Configure Mocks (Part 1) 03:15
    Configure Mocks (Part 2) 01:41
    What Is patch()? 01:33
    patch() as Decorator 04:44
    patch() as Context Manager 01:11
    patch.object() as Context Manager 03:47
    patch.object() as Decorator 01:18
    Common Problems With Mocking 02:08
    spec List 03:05
    spec Module 01:55
    autospec 02:53
    Improve Your Tests With the Python Mock Object Library (Quiz) 08:00
    Improve Your Tests With the Python Mock Object Library (Summary) 01:02

© 2012–2025 Real Python ⋅ Privacy Policy