+1 -1 +12
Vote on this proposal

Unit testing using Mock

by Gaurav Sood (speaking)

Section
Software Development Tools
Session type
Talk
Technical level
Beginner

Objective

Introduce the Mock library as a powerful unit testing tool

Description

The Mock library in Python enables testing of the code written, using "Mock" objects and asserting the results of various operations on those mock objects. It is designed for use with the standard unittest tool in Python, and it turns out to be a powerful test tool

Outline of the session:

0-5 mins:

Introduce Unit testing for those who are new to the concept, as well as give an idea of the PyUnit testing framework.

5-10 mins:

Give an idea of the Mock library, introducing the concept of mock objects and their use in the unit testing.

10-20 mins:

A series of short code snippets showing the use of Mock for unit testing

20-25 mins:

Questions, if any

Speaker bio

Self-taught Python programmer and enthusiast, I am a final year Engineering student based in Pune. A FOSS enthusiast for the past 6 years, I am a GNOME lover and am interested in development using GTK with Python as the language of choice. openSUSE lover for its simplicity and power.