Exemple #1
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': {}})
 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)
Exemple #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)
 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": {}})
Exemple #5
0
 def test_global_settings(self):
     '''
     Test if it shows global_settings
     '''
     self.assertDictEqual(ilo.global_settings(), {'Global Settings': {}})
Exemple #6
0
 def test_global_settings(self):
     '''
     Test if it shows global_settings
     '''
     self.assertDictEqual(ilo.global_settings(), {'Global Settings': {}})