def METHOD_NAME(request, cls, prop_name, **kwargs):
    """Return mock for property *prop_name* on class *cls*.
    The patch is reversed after pytest uses it.
    """
    _patch = patch.object(cls, prop_name, new_callable=PropertyMock, **kwargs)
    request.addfinalizer(_patch.stop)
    return _patch.start()