PyCon UK

Registration Office

How not to make a mockery of it

Make the most of unittest.mock when testing

Martijn Pieters

Monday 17th, 17:00 (Assembly Room)


A talk (25 minutes)

The Python standard library comes with a great tool for helping you write isolated unit tests: unittest.mock. But, as evident from Stack Overflow questions on the subject, many people struggle to understand how to use the library correctly. This talk will help you understand how to use unitest.mock effectively, with the help of a few problems inspired by those Stack Overflow posts.

This talk is aimed at people that already know how to write unittests, but want to know how to get the most out of unittest.mock.

Back to schedule