예제 #1
0
파일: test_ilo.py 프로젝트: morinap/salt-1
 def test_global_settings(self):
     '''
     Test if it shows global_settings
     '''
     with patch('salt.modules.ilo.__execute_cmd',
                MagicMock(return_value={'Global Settings': {}})):
         self.assertDictEqual(ilo.global_settings(),
                              {'Global Settings': {}})
예제 #2
0
 def test_execute_cmd(self):
     """
     Test if __execute_command opens the temporary file
     properly when calling global_settings.
     """
     mock_cmd_run = MagicMock(return_value={"retcode": 0, "stdout": ""})
     with patch.dict(ilo.__salt__, {"cmd.run_all": mock_cmd_run}):
         ret = ilo.global_settings()
         self.assertEqual(ret, True)
예제 #3
0
 def test_execute_cmd(self):
     '''
     Test if __execute_command opens the temporary file
     properly when calling global_settings.
     '''
     mock_cmd_run = MagicMock(return_value={'retcode': 0, 'stdout': ''})
     with patch.dict(ilo.__salt__, {'cmd.run_all': mock_cmd_run}):
         ret = ilo.global_settings()
         self.assertEqual(ret, True)
예제 #4
0
 def test_global_settings(self):
     """
     Test if it shows global_settings
     """
     with patch(
             "salt.modules.ilo.__execute_cmd",
             MagicMock(return_value={"Global Settings": {}}),
     ):
         self.assertDictEqual(ilo.global_settings(),
                              {"Global Settings": {}})
예제 #5
0
파일: test_ilo.py 프로젝트: cldeluna/salt
 def test_global_settings(self):
     '''
     Test if it shows global_settings
     '''
     self.assertDictEqual(ilo.global_settings(), {'Global Settings': {}})
예제 #6
0
파일: ilo_test.py 프로젝트: DaveQB/salt
 def test_global_settings(self):
     '''
     Test if it shows global_settings
     '''
     self.assertDictEqual(ilo.global_settings(), {'Global Settings': {}})