'Test anonymous user.'

@mock.patch.object(context_processors, 'unread_count_for')
def test_anonymous(self, unread_count_for):

    unread_count_for.return_value = 3
    rf = RequestFactory()
    request = rf.get('/')
    request.user = AnonymousUser()
    eq_(0, unread_message_count(request)['unread_message_count'])
    assert (not unread_count_for.called)
