def test_load_logging_fallback(configuration: Configuration, mocker: MockerFixture) -> None: """ must fallback to stderr without errors """ mocker.patch("logging.config.fileConfig", side_effect=PermissionError()) configuration.load_logging(True)
def test_load_logging_stderr(configuration: Configuration, mocker: MockerFixture) -> None: """ must use stderr if flag set """ logging_mock = mocker.patch("logging.config.fileConfig") configuration.load_logging(False) logging_mock.assert_not_called()