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")
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')