def test_version(self):
     """
     Test if it returns the version of locate
     """
     mock = MagicMock(return_value="mlocate 0.26")
     with patch.dict(locate.__salt__, {"cmd.run": mock}):
         self.assertListEqual(locate.version(), ["mlocate 0.26"])
Beispiel #2
0
 def test_version(self):
     '''
     Test if it returns the version of locate
     '''
     mock = MagicMock(return_value='mlocate 0.26')
     with patch.dict(locate.__salt__, {'cmd.run': mock}):
         self.assertListEqual(locate.version(), ['mlocate 0.26'])
Beispiel #3
0
 def test_version(self):
     '''
     Test if it returns the version of locate
     '''
     mock = MagicMock(return_value='mlocate 0.26')
     with patch.dict(locate.__salt__, {'cmd.run': mock}):
         self.assertListEqual(locate.version(), ['mlocate 0.26'])