

def test_generates_scripts_path_in_case_of_several_plugins(self):
    stage = 'pre_deployment'
    plugins = []
    names = ['plugin_name1', 'plugin_name2']
    for name in names:
        plugin = mock.Mock()
        plugin.full_name = name
        plugin.slaves_scripts_path = name
        plugin.tasks = [{
            'type': 'shell',
            'role': 'controller',
            'stage': stage,
            'parameters': {
                'timeout': 15,
                'cmd': 'cmd',
            },
        }]
        plugins.append(plugin)
    result = self.hook.deployment_tasks(plugins, stage)
    script_paths = sorted(map((lambda p: p['parameters']['cwd']), result))
    self.assertEqual(script_paths, names)

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/unit/test_plugins_serializers.py TestBasePluginDeploymentHooksSerializer.test_generates_scripts_path_in_case_of_several_plugins/original