Exemplo n.º 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"])
Exemplo n.º 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'])
Exemplo n.º 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'])