def _mark_method_skipped(meth, reason):

    @functools.wraps(meth)
    def wrapper(*args, **kwargs):
        raise testtools.testcase.TestSkipped(reason)

    return wrapper
Mark method as skipped by replacing the actual method with wrapper
dataset/ETHPy150Open openstack/horizon/openstack_dashboard/test/integration_tests/decorators.py/_mark_method_skipped