DjangoCon US 2015 - Intro to Mocking: Why Unit Testing Doesn't Have To Be So Hard by Daniel Davis

Intro to Mocking: Why Unit Testing Doesn't Have To Be So Hard by Daniel Davis

Many developers want to write better code, but simply don't know how to write units tests for:

Code that calls other code (i.e. code with dependencies) Methods that have no return value Code that throws exceptions Mocking provides a valuable tool for solving these problems. In this talk, we'll discuss the scenarios in which Mocking is useful, the strategies for addressing each of the cases above and write simple, clean unit tests using the built-in Mock library.

Help us caption & translate this video!

http://amara.org/v/HH6d/

Date Added: September 19, 2024

Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.