would [this](http://www.voidspace.org.uk/python/mock/examples.html#mocking-chained-calls) suite your needs?