The following examples all use the Python Mock library. This post is intended as a quick “Getting Started” for someone who is new to using Python Mock. For more advanced usages you can refer to the Python Mock Documentation. You can download the code from GitHub here. (Follow the instructions in the Readme) Setup You will need to install the mock library: Here is the code we will use as our “code