def METHOD_NAME():
    """
    Test if it list the installed versions of python.
    """
    mock_opt = MagicMock(return_value="salt stack")
    mock_cmd = MagicMock(return_value=True)
    mock_all = MagicMock(
        return_value={"retcode": True, "stdout": "salt", "stderr": "error"}
    )
    with patch.dict(
        pyenv.__salt__,
        {
            "cmd.has_exec": mock_cmd,
            "config.option": mock_opt,
            "cmd.run_all": mock_all,
        },
    ):
        assert pyenv.versions() == []