def test_is_installed(self): ''' Test if it check if pyenv is installed. ''' mock_cmd = MagicMock(return_value=True) mock_opt = MagicMock(return_value='salt stack') with patch.dict(pyenv.__salt__, {'config.option': mock_opt, 'cmd.has_exec': mock_cmd}): self.assertTrue(pyenv.is_installed())
def test_is_installed(self): """ Test if it check if pyenv is installed. """ mock_cmd = MagicMock(return_value=True) mock_opt = MagicMock(return_value="salt stack") with patch.dict( pyenv.__salt__, {"config.option": mock_opt, "cmd.has_exec": mock_cmd} ): self.assertTrue(pyenv.is_installed())