'Return mock process as dict.'

def as_dict(self, attrs=None):

    dic = {}
    if (attrs is None):
        return dic
    for name in attrs:
        if hasattr(self, name):
            attr = getattr(self, name)
            if callable(attr):
                dic[name] = attr()
            else:
                dic[name] = attr
        else:
            dic[name] = None
    return dic
