Mocking in Python as a testing tool

Details

How can you start testing an application that had no tests earlier where everything depends on everything else? One way to overcome the interdependence - till you can eliminate it - is to mock part of the system.

How can you test an application that depends on a 3rd party system? Especially, how can you test your application for cases when the 3rd party system returns errors or misbehaves? e.g. how can you test the behavior of your system when the 3rd party reports “over quota” for the number of requests you sent. You probably don’t want to actually reach their limit racking up the fee you need to pay. Mocking can help there too.

In this meeting we will learn about Mocking in and for testing. After a presentation we’ll split up into pairs and then we are going to write tests and use mocking when necessary.

You are expected to bring your own computer with Python installed on it.