Beispiel #1
0
 def test_network_info(self):
     """
     Tests to return Network Configuration
     """
     mock = MagicMock(return_value={"retcode": 0, "stdout": None})
     with patch.dict(drac.__salt__, {"cmd.run_all": mock}):
         mock = MagicMock(return_value="ABC")
         with patch.object(drac, "__parse_drac", mock):
             self.assertEqual(drac.network_info(), "ABC")
Beispiel #2
0
 def test_network_info(self):
     '''
     Tests to return Network Configuration
     '''
     mock = MagicMock(return_value={'retcode': 0, 'stdout': None})
     with patch.dict(drac.__salt__, {'cmd.run_all': mock}):
         mock = MagicMock(return_value='ABC')
         with patch.object(drac, '__parse_drac', mock):
             self.assertEqual(drac.network_info(), 'ABC')
Beispiel #3
0
 def test_network_info(self):
     '''
     Tests to return Network Configuration
     '''
     mock = MagicMock(return_value={'retcode': 0, 'stdout': None})
     with patch.dict(drac.__salt__, {'cmd.run_all': mock}):
         mock = MagicMock(return_value='ABC')
         with patch.object(drac, '__parse_drac', mock):
             self.assertEqual(drac.network_info(), 'ABC')