Exemplo n.º 1
0
 def test_run_invalid(self):
     try:
         main()
     except InvalidExecutionType:
         pass
     self.assertRaises(InvalidExecutionType)
Exemplo n.º 2
0
 def test_run_surplus_argv(self):
     try:
         main()
     except SystemExit:
         pass
     self.assertRaises(SystemExit)
Exemplo n.º 3
0
 def test_run_local(self, mock_rm, mock_run, mock_envVars):
     main()
     mock_envVars.assert_called_once_with('local')
     mock_run.assert_called_once()
     mock_rm.assert_called_once_with('run_config.yaml')
Exemplo n.º 4
0
 def test_run_build(self, mock_rm, mock_run, mock_envVars):
     main()
     mock_envVars.assert_called_once_with('development')
     mock_run.assert_called_once()
     mock_rm.assert_called_once_with('run_config.yaml')
Exemplo n.º 5
0
 def test_run_deploy(self, mock_rm, mock_run, mock_env, mock_envVars):
     main()
     mock_envVars.assert_called_once()
     mock_env.assert_called_once()
     mock_run.assert_called_once()
     mock_rm.assert_called_once()
Exemplo n.º 6
0
 def test_run_surplus_argv(self):
     with pytest.raises(SystemExit):
         main()
Exemplo n.º 7
0
 def test_run_invalid(self):
     with pytest.raises(InvalidExecutionType):
         main()
Exemplo n.º 8
0
 def test_run_bad_function(self, mock_remove, mock_err):
     main()
     mock_err.assert_called_once_with('bad_function')
     mock_remove.assert_called_once_with('run_config.yaml')
Exemplo n.º 9
0
 def test_run_main(self, mock_remove, mock_deploy):
     main()
     mock_deploy.assert_called_once_with('development')
     mock_remove.assert_called_once_with('run_config.yaml')