

@mock.patch('nailgun.logger.logger.warn')
def test_ignoring_unsupported_deployment_tasks(self, m_warn):
    stage = 'pre_deployment'
    role = 'controller'
    plugin = mock.Mock()
    plugin.full_name = 'plugin_name'
    plugin.tasks = [{
        'type': 'unsupported',
        'role': role,
        'id': '1',
        'stage': stage,
        'parameters': {
            'cmd': 'test1',
            'cwd': '/',
            'timeout': 15,
        },
    }]
    self.assertItemsEqual(self.hook.deployment_tasks([plugin], stage), list())
    m_warn.assert_called_once_with('Task is skipped %s, because its type is not supported', plugin.tasks[0])

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