

@mock.patch('nailgun.orchestrator.plugins_serializers.templates.make_ubuntu_sources_task', return_value={
    'task_type': 'ubuntu_sources_task',
    'parameters': {
        
    },
})
@mock.patch('nailgun.orchestrator.plugins_serializers.templates.make_ubuntu_preferences_task', return_value=None)
@mock.patch('nailgun.orchestrator.plugins_serializers.templates.make_apt_update_task', return_value={
    'task_type': 'apt_update_task',
    'parameters': {
        
    },
})
def test_create_repositories_ubuntu_does_not_generate_prefences_if_none(self, *_):
    self.cluster.release.operating_system = consts.RELEASE_OS.ubuntu
    tasks = self.hook.create_repositories(self.plugins)
    self.assertItemsEqual(map((lambda t: t['task_type']), tasks), ['ubuntu_sources_task', 'apt_update_task'])

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/unit/test_plugins_serializers.py TestPluginsPreDeploymentHooksSerializer.test_create_repositories_ubuntu_does_not_generate_prefences_if_none/original