See other tests (https://github.com/p2pu/badges/blob/master/badges/badge/tests.py#L64), we are using mock for patching methods and classes. We shouldn't use 2 different libraries for this. mock is now part of the standard library for python 3.3, so i think we should stick with it?