Example #1
0
 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))
Example #2
0
 def test_get_file_handler(self):
   with temppath() as tpath:
     config = Config(tpath)
     handler = config.get_log_handler('cmd')
     ok_(isinstance(handler, TimedRotatingFileHandler))