Testing python applications can be confusing, and leave you in a daze about what the proper way to test when create an API or access a remote service. Let's explore the testing world with a gentle introduction to unittest, py.test, mock, gabbi, and betamax. We'll learn how to isolate our tests from databases, APIs and third party libraries. We'll also look at some common tricks you might need when testing your python application including raising exceptions, validating exceptions, and return different values for each call to a function.
- Introduction to testing in Python
- Creating our first test
- Mocking
- Using our first mock
- Mocking Builtin functions like
open
- Raising an error to test error handling