Exemple #1
0
 def test_version(self):
     """
     Test for Display version from monit -V
     """
     mock = MagicMock(return_value="This is Monit version 5.14\nA\nB")
     with patch.dict(monit.__salt__, {"cmd.run": mock}):
         self.assertEqual(monit.version(), "5.14")
Exemple #2
0
 def test_version(self):
     '''
     Test for Display version from monit -V
     '''
     mock = MagicMock(return_value="This is Monit version 5.14\nA\nB")
     with patch.dict(monit.__salt__, {'cmd.run': mock}):
         self.assertEqual(monit.version(), '5.14')
Exemple #3
0
 def test_version(self):
     '''
     Test for Display version from monit -V
     '''
     mock = MagicMock(return_value="This is Monit version 5.14\nA\nB")
     with patch.dict(monit.__salt__, {'cmd.run': mock}):
         self.assertEqual(monit.version(), '5.14')