'Creates a mock user with the specified properties.'

def create_mock_user(self, is_authenticated=True, is_staff=True, is_enrolled=True):

    user = UserFactory()
    user.name = 'mock_user'
    user.is_staff = is_staff
    user.is_enrolled = is_enrolled
    user.is_authenticated = (lambda : is_authenticated)
    return user
