示例#1
0
 def test_logging_info(
     self, m_logger, m_run, m_ish, m_logging, m_config_logging, m_config, m_cli
 ):
     m_cli().parser.parse_args.return_value = Mock(config_file="nowcast.yaml")
     m_config.file = "nowcast.yaml"
     m_config().load.return_value = {"logging": {}}
     scheduler.main()
     assert m_logger.info.call_count == 3
示例#2
0
 def test_commandline_interface(
     self, m_run, m_ish, m_logging, m_config_logging, m_config, m_cli
 ):
     scheduler.main()
     args, kwargs = m_cli.call_args_list[0]
     assert args[0] == "scheduler"
     assert "package" in kwargs
     assert "description" in kwargs
     m_cli().build_parser.assert_called_once_with()
示例#3
0
 def test_run(self, m_run, m_ish, m_logging, m_config_logging, m_config, m_cli):
     m_cli().parser.parse_args.return_value = Mock(config_file="nowcast.yaml")
     scheduler.main()
     m_run.assert_called_once_with(m_config())
示例#4
0
 def test_install_signal_handlers(
     self, m_run, m_ish, m_logging, m_config_logging, m_config, m_cli
 ):
     m_cli().parser.parse_args.return_value = Mock(config_file="nowcast.yaml")
     scheduler.main()
     m_ish.assert_called_once_with()
示例#5
0
 def test_logging_config(
     self, m_run, m_ish, m_logging, m_config_logging, m_config, m_cli
 ):
     scheduler.main()
     m_config_logging.assert_called_once_with(m_config())
示例#6
0
 def test_cli_parser(
     self, m_run, m_ish, m_logging, m_config_logging, m_config, m_cli
 ):
     scheduler.main()
     m_cli().parser.parse_args.assert_called_once_with()