

def test_support_reboot_type_task(self):
    stage = 'pre_deployment'
    plugin = mock.Mock()
    plugin.full_name = 'plugin_name'
    plugin.slaves_scripts_path = 'plugin_path'
    plugin.tasks = [{
        'type': 'reboot',
        'role': 'controller',
        'stage': stage,
        'parameters': {
            'timeout': 15,
        },
    }]
    result = self.hook.deployment_tasks([plugin], stage)
    expecting_format = {
        'id': None,
        'diagnostic_name': 'plugin_name',
        'fail_on_error': True,
        'parameters': {
            'timeout': 15,
        },
        'type': 'reboot',
        'uids': [1, 2],
    }
    self.assertItemsEqual([expecting_format], result)

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