def test_should_return_info_when_no_debug_option_is_given(self): fake_arguments = {'--debug': False} actual = determine_console_log_level(fake_arguments) self.assertEqual(INFO, actual)
def test_should_return_debug_when_debug_option_is_given(self): fake_arguments = {'--debug': True} actual = determine_console_log_level(fake_arguments) self.assertEqual(DEBUG, actual)
def initialize_logging_to_console(arguments): """ Initializes the logging to console and appends the console handler to the root logger """ console_log_level = determine_console_log_level(arguments) append_console_logger(LOGGER, console_log_level)