def METHOD_NAME(
    monkeypatch, caplog, run_fails, exp_return, text_in_log
):
    monkeypatch.setattr(
        sctplib,
        'run',
        RunMocked(
            exc_type=partial(
                sctplib.CalledProcessError, 'message', 'command', 'result'
            )
            if run_fails
            else None
        ),
    )
    with caplog.at_level(logging.DEBUG):
        assert sctplib.was_sctp_used() == exp_return
    if text_in_log:
        assert text_in_log in caplog.text