Пример #1
0
 def test_pip_install_multiple(self):
     """
     Check if pip_install works correctly with multiple packages
     """
     packages.pip_install(["mock", "nose"])
     self.pip_execute.assert_called_with(["install",
                                          "mock", "nose"])
def install_charm_juju_lint():
    create_install_dirs()
    virtualenv.create_environment(USR_LIB)
    packages.pip_install("juju", venv=USR_LIB)
    deploy_scripts()
    hookenv.status_set("active", "Unit is ready")
    set_flag("charm-juju-lint.installed")
Пример #3
0
 def test_pip_install_upgrade(self):
     """
     Check if pip_install works correctly with a single package
     """
     packages.pip_install("mock", upgrade=True)
     self.pip_execute.assert_called_with(["install",
                                          "--upgrade",
                                          "mock"])
Пример #4
0
 def test_pip_install_venv(self, join, check_call):
     """
     Check if pip_install works correctly with multiple packages
     """
     join.return_value = 'joined-path'
     packages.pip_install(["mock", "nose"], venv=True)
     check_call.assert_called_with(["joined-path", "install",
                                    "mock", "nose"])
Пример #5
0
def install():
    dlog("Stating Datera driver installation")
    dest = get_install_dest()
    backup_folder(dest)
    if config('install_type') == 'github':
        install_from_github(config('install_url'), config('install_tag'), dest)
    elif config('install_type') == 'archive-url':
        install_from_archive_url(config('install_url'), dest)
    elif config('install_type') == 'archive-local':
        install_from_archive_local(config('install_file'), dest)
    else:
        raise DateraException("Unknown install type {}".format(
            config('install_type')))
    packages.pip_install("dfs_sdk", upgrade=True)
Пример #6
0
    def test_pip_install(self):
        """
        Check if pip_install works correctly with a single package
        """
        packages.pip_install("mock")
        self.pip_execute.assert_called_with(["install", "mock"])
        packages.pip_install("mock", proxy="proxy_addr:8080")

        self.pip_execute.assert_called_with(
            ["install", "--proxy=proxy_addr:8080", "mock"])
        packages.pip_install("mock", log="output.log", proxy="proxy_addr:8080")

        self.pip_execute.assert_called_with(
            ["install", "--log=output.log", "--proxy=proxy_addr:8080", "mock"])