From 7aef13252ab77c9bcbd4740ef7c85b6cce46a36e Mon Sep 17 00:00:00 2001 From: zhurong Date: Thu, 13 Dec 2018 10:19:59 +0800 Subject: [PATCH] Fix python2 and python3 compatible Change-Id: Icfada31a9aa9393def784bfe1f0b8fd49279abba --- .../tests/api/application_catalog/test_env_templates.py | 4 ++-- .../tests/api/application_catalog/test_static_actions.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/murano_tempest_tests/tests/api/application_catalog/test_env_templates.py b/murano_tempest_tests/tests/api/application_catalog/test_env_templates.py index 436747a..779beca 100644 --- a/murano_tempest_tests/tests/api/application_catalog/test_env_templates.py +++ b/murano_tempest_tests/tests/api/application_catalog/test_env_templates.py @@ -41,8 +41,8 @@ class TestEnvironmentTemplatesSanity(base.BaseApplicationCatalogTest): # Deleting dates from dictionaries to skip it in assert env_template.pop('updated', None) env_template.pop('created', None) - map(lambda x: x.pop('updated', None), env_templates_list) - map(lambda x: x.pop('created', None), env_templates_list) + list(map(lambda x: x.pop('updated', None), env_templates_list)) + list(map(lambda x: x.pop('created', None), env_templates_list)) self.assertIn(env_template, env_templates_list) self.application_catalog_client.\ delete_env_template(env_template['id']) diff --git a/murano_tempest_tests/tests/api/application_catalog/test_static_actions.py b/murano_tempest_tests/tests/api/application_catalog/test_static_actions.py index 3b714d9..0ec8d8c 100644 --- a/murano_tempest_tests/tests/api/application_catalog/test_static_actions.py +++ b/murano_tempest_tests/tests/api/application_catalog/test_static_actions.py @@ -58,7 +58,7 @@ class TestStaticActions(base.BaseApplicationCatalogTest): class_name=self.package['class_definitions'][0], method_name='staticAction', args={'myName': 'John'}) - self.assertEqual('"Hello, John"', action_result) + self.assertEqual(b'"Hello, John"', action_result) @decorators.attr(type='smoke') @decorators.idempotent_id('8b427735-bb73-41ab-8992-c81b3d8ebc42') @@ -73,4 +73,4 @@ class TestStaticActions(base.BaseApplicationCatalogTest): method_name='staticAction', package_name=self.package[name_attr], class_version="<1", args={'myName': 'John'}) - self.assertEqual('"Hello, John"', action_result) + self.assertEqual(b'"Hello, John"', action_result)