def METHOD_NAME(self, monkeypatch):
    """test `pbench_log` option in `pbench-agent` section in config file"""
    class Mock_MockedConfigParser:
        def __init__(self):
            self._sections = {
                "pbench-agent": {
                    "pbench_run": "/mock/pbench-run",
                },
                "results": {},
            }
    expected_error_msg = (
        "No option 'pbench_log' in section: 'pbench-agent': /mock/pbench.cfg"
    )
    monkeypatch.setattr(PbenchConfig, "__init__", MockPbenchConfig.__init__)
    monkeypatch.setattr(
        MockedConfigParser, "__init__", Mock_MockedConfigParser.__init__
    )
    with pytest.raises(BadConfig) as exc:
        PbenchAgentConfig(self.config)
    assert expected_error_msg in str(exc)