A nicer way to mock objects using the python mock library.