Test & Code

132: mocking in Python - Anna-Lena Popkes


Listen Later

Using mock objects during testing in Python.

Anna-Lena joins the podcast to teach us about mocks and using unittest.mock objects during testing.

We discuss:

  • the different styles of using mocks
  • pros and cons of mocks
  • dependency injection
  • adapter pattern
  • mock hell
  • magical universe
  • and much more
  • Special Guest: Anna-Lena Popkes.

    Sponsored By:

    • Talk Python Training: Online video courses for Python developers
    • PyCharm Professional: Try PyCharm Pro for 4 months and learn how PyCharm will save you time. Promo Code: TESTANDCODE22
    • HoneyBadger: When bad things happen, it's nice to know that Honeybadger has your back. 30% off for first 6 months when you mention Test & Code Podcast when signing up.

    Links:

    • Personal webpage of Anna-Lena Popkes
    • Magical Universe — Awesome Python features explained using the world of magic
    • Test & Code 102: Cosmic Python, TDD, testing and external dependencies — The episode where Harry Percival discusses mocking.
    • Talk: Harry Percival - Stop Using Mocks (for a while) - YouTube — Talk: Harry Percival - Stop Using Mocks (for a while)
    • unittest.mock
    • Autospeccing
    • Mock Hell Talk (45 min version) Edwin Jung - PyCon 2019
    • Mock Hell Talk (30 min version) - Edwin Jung - PyConDE
    • PyCon Estonia
    • KI macht Schule!
    • Talk Python #186 : 100 Days of Python in a Magical Universe
    ★ Support this podcast on Patreon ★
    ...more
    View all episodesView all episodes
    Download on the App Store

    Test & CodeBy Brian Okken

    • 4.7
    • 4.7
    • 4.7
    • 4.7
    • 4.7

    4.7

    70 ratings


    More shows like Test & Code

    View all
    Software Engineering Radio - the podcast for professional software developers by se-radio@computer.org

    Software Engineering Radio - the podcast for professional software developers

    272 Listeners

    The Changelog: Software Development, Open Source by Changelog Media

    The Changelog: Software Development, Open Source

    283 Listeners

    Thoughtworks Technology Podcast by Thoughtworks

    Thoughtworks Technology Podcast

    41 Listeners

    Data Skeptic by Kyle Polich

    Data Skeptic

    483 Listeners

    Talk Python To Me by Michael Kennedy

    Talk Python To Me

    592 Listeners

    Software Engineering Daily by Software Engineering Daily

    Software Engineering Daily

    624 Listeners

    Soft Skills Engineering by Jamison Dance and Dave Smith

    Soft Skills Engineering

    269 Listeners

    Python Bytes by Michael Kennedy and Brian Okken

    Python Bytes

    213 Listeners

    Data Engineering Podcast by Tobias Macey

    Data Engineering Podcast

    142 Listeners

    Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

    Syntax - Tasty Web Development Treats

    982 Listeners

    Practical AI by Practical AI LLC

    Practical AI

    190 Listeners

    The Stack Overflow Podcast by The Stack Overflow Podcast

    The Stack Overflow Podcast

    64 Listeners

    The Real Python Podcast by Real Python

    The Real Python Podcast

    140 Listeners

    Oxide and Friends by Oxide Computer Company

    Oxide and Friends

    47 Listeners

    The Pragmatic Engineer by Gergely Orosz

    The Pragmatic Engineer

    52 Listeners