def METHOD_NAME(attachment, accessible=True, expected_exc=Forbidden):
    __tracebackhide__ = True
    rh.attachment = attachment
    if accessible:
        rh._check_access()
    else:
        with pytest.raises(expected_exc) as exc_info:
            rh._check_access()
        assert exc_info.type is expected_exc