+1 for the mock object.
An example would be : https://github.com/mozilla/marketplace-tests/blob/master/mocks/mock_user.py