示例#1
0
    def _initBaseInstallator(self, install=False):
        baseInst = BaseInstallator()
        
        self.ch = self._initConfigHolder(install)
        baseInst._assignConfigHolder(self.ch)

        return baseInst
示例#2
0
    def _initConfigHolder(self, install=False):
        ch = ConfigHolder.ConfigHolder()
        ch.verboseLevel = 0
        for name in BaseInstallator.availableInstallatorNames():
            ch.set('install%s' % name.title(), install)

        return ch
示例#3
0
    def test_launchInstallator_CheckCallOrder(self):
        BaseInstallator._executeInstall = Mock()

        COMPONENTS_NUMBER = 2
        COMPONENTS = BaseInstallator.availableInstallatorNames()[:COMPONENTS_NUMBER]
        
        baseInst = self._initBaseInstallator()
        baseInst._launchInstallator(COMPONENTS)

        assert baseInst._executeInstall.call_count == COMPONENTS_NUMBER

        componetsToInstall = []
        for call_args in baseInst._executeInstall.call_args_list:
            args, _ = call_args
            componentName = args[0]
            componetsToInstall.append(componentName)
        assert COMPONENTS == tuple(componetsToInstall)