예제 #1
0
 def test_get_rules(self):
     """
     Test for Get the virtual server rules
     """
     with patch.object(lvs, "__detect_os", return_value="C"):
         with patch.dict(lvs.__salt__,
                         {"cmd.run": MagicMock(return_value="A")}):
             self.assertEqual(lvs.get_rules(), "A")
예제 #2
0
파일: test_lvs.py 프로젝트: morinap/salt-1
 def test_get_rules(self):
     '''
     Test for Get the virtual server rules
     '''
     with patch.object(lvs, '__detect_os', return_value='C'):
         with patch.dict(lvs.__salt__,
                         {'cmd.run': MagicMock(return_value='A')}):
             self.assertEqual(lvs.get_rules(), 'A')
예제 #3
0
파일: lvs_test.py 프로젝트: DaveQB/salt
 def test_get_rules(self):
     '''
     Test for Get the virtual server rules
     '''
     with patch.object(lvs, '__detect_os', return_value='C'):
         with patch.dict(lvs.__salt__,
                         {'cmd.run':
                          MagicMock(return_value='A')}):
             self.assertEqual(lvs.get_rules(), 'A')