Mock configuration tip

A little tip for working with the mock library. Let's say you need to set up some child attributes, like for example you're mocking up a django.contrib.auth.User, and you want it to be a logged in user:

>>> user = mock.Mock()
>>> user.username = 'Bob'
>>> user.is_authenticated ...
more ...