diff --git a/tripleoclient/tests/test_utils.py b/tripleoclient/tests/test_utils.py index 080b496f4..fb5533304 100644 --- a/tripleoclient/tests/test_utils.py +++ b/tripleoclient/tests/test_utils.py @@ -811,6 +811,12 @@ class TestReplaceLinks(TestCase): source = ( 'description: my template\n' 'heat_template_version: "2014-10-16"\n' + 'parameters:\n' + ' foo:\n' + ' default: ["bar"]\n' + ' type: json\n' + ' bar:\n' + ' default: []\n' 'resources:\n' ' test_config:\n' ' properties:\n' @@ -820,6 +826,12 @@ class TestReplaceLinks(TestCase): expected = ( 'description: my template\n' 'heat_template_version: "2014-10-16"\n' + 'parameters:\n' + ' foo:\n' + ' default: ["bar"]\n' + ' type: json\n' + ' bar:\n' + ' default: []\n' 'resources:\n' ' test_config:\n' ' properties:\n' diff --git a/tripleoclient/utils.py b/tripleoclient/utils.py index 066e74ce4..9bcb2e29a 100644 --- a/tripleoclient/utils.py +++ b/tripleoclient/utils.py @@ -901,7 +901,7 @@ def replace_links_in_template(template_part, link_replacement): return {k: replaced_dict_value(k, v) for k, v in six.iteritems(template_part)} elif isinstance(template_part, list): - return map(replaced_list_value, template_part) + return list(map(replaced_list_value, template_part)) else: return template_part