def test_disable_file_logging(self): with temppath() as tpath: config = Config(tpath) config.add_section('cmd.command') config.set('cmd.command', 'log.disable', 'true') save_config(config) config = Config(tpath) handler = config.get_log_handler('cmd') ok_(not isinstance(handler, TimedRotatingFileHandler))
def test_get_file_handler(self): with temppath() as tpath: config = Config(tpath) handler = config.get_log_handler('cmd') ok_(isinstance(handler, TimedRotatingFileHandler))