Esempio n. 1
0
 def test_clear(self):
     '''
     Test for Clear the virtual server table
     '''
     with patch.object(lvs, '__detect_os', return_value='C'):
         with patch.dict(lvs.__salt__,
                         {'cmd.run_all':
                          MagicMock(return_value={'retcode':
                                                  'ret',
                                                  'stderr':
                                                  'stderr'})}):
             self.assertEqual(lvs.clear(), 'stderr')
Esempio n. 2
0
 def test_clear(self):
     '''
     Test for Clear the virtual server table
     '''
     with patch.object(lvs, '__detect_os', return_value='C'):
         with patch.dict(lvs.__salt__,
                         {'cmd.run_all':
                          MagicMock(return_value={'retcode':
                                                  'ret',
                                                  'stderr':
                                                  'stderr'})}):
             self.assertEqual(lvs.clear(), 'stderr')
Esempio n. 3
0
 def test_clear(self):
     """
     Test for Clear the virtual server table
     """
     with patch.object(lvs, "__detect_os", return_value="C"):
         with patch.dict(
                 lvs.__salt__,
             {
                 "cmd.run_all":
                 MagicMock(return_value={
                     "retcode": "ret",
                     "stderr": "stderr"
                 })
             },
         ):
             self.assertEqual(lvs.clear(), "stderr")