Example #1
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"])
Example #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'])
Example #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'])