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