Beispiel #1
0
 def test_run_worker(self, m_worker):
     m_worker().cli = Mock(name="cli")
     watch_NEMO_hindcast.main()
     args, kwargs = m_worker().run.call_args
     assert args == (
         watch_NEMO_hindcast.watch_NEMO_hindcast,
         watch_NEMO_hindcast.success,
         watch_NEMO_hindcast.failure,
     )
Beispiel #2
0
 def test_add_run_id_option(self, m_worker):
     m_worker().cli = Mock(name="cli")
     watch_NEMO_hindcast.main()
     args, kwargs = m_worker().cli.add_argument.call_args_list[1]
     assert args == ("--run-id",)
     assert "help" in kwargs
Beispiel #3
0
 def test_init_cli(self, m_worker):
     m_worker().cli = Mock(name="cli")
     watch_NEMO_hindcast.main()
     m_worker().init_cli.assert_called_once_with()
Beispiel #4
0
 def test_add_host_name_arg(self, m_worker):
     m_worker().cli = Mock(name="cli")
     watch_NEMO_hindcast.main()
     args, kwargs = m_worker().cli.add_argument.call_args_list[0]
     assert args == ("host_name",)
     assert "help" in kwargs
Beispiel #5
0
 def test_instantiate_worker(self, m_worker):
     m_worker().cli = Mock(name="cli")
     watch_NEMO_hindcast.main()
     args, kwargs = m_worker.call_args
     assert args == ("watch_NEMO_hindcast",)
     assert list(kwargs.keys()) == ["description"]