def class_mock(request, q_class_name, autospec=True, **kwargs):
    _patch = patch(q_class_name, autospec=autospec, **kwargs)
    request.addfinalizer(_patch.stop)
    return _patch.start()
Return a mock patching the class with qualified name *q_class_name*.
dataset/ETHPy150Open python-openxml/python-docx/tests/unitutil/mock.py/class_mock