def METHOD_NAME(mocker):
    METHOD_NAME = mocker.Mock()
    yield METHOD_NAME
    assert METHOD_NAME.mock_calls
    METHOD_NAME.warning.assert_called()
    assert (
        len(METHOD_NAME.warning.mock_calls) == 3
    ), "Expected all 3 errors ALWAYS logged as warnings"