Recently I came across a nice article written by Naftuli, a freelancer at totpal describing the need of writing mocks to test your services.  The blog clearly explains how to develop mocks and stubs using mock library introduced in Python 3.3 ( Advantages of using this approach for testing are enormous.

You can read more about it on toptal’s blog. Refer this link: