From 778ddb1eeee0acdf91913663cb1adab2a7dd3fcf Mon Sep 17 00:00:00 2001 From: Nguyen Hung Phuong Date: Wed, 10 Jan 2018 17:17:04 +0700 Subject: [PATCH] Switch to tempest.common.utils.requires_ext Tempest deprecated tempest.test.requires_ext [1] At this moment, it is available in tempest.common.utils [1] https://review.openstack.org/#/c/493668/ Change-Id: Iea8e7425a9a16b5e4789cc8e3e2bf9dd09f7d9d6 --- .../tests/tempest_plugin/tests/api/test_fwaas_extensions.py | 4 ++-- .../tests/tempest_plugin/tests/api/test_fwaasv2_extensions.py | 4 ++-- .../tests/tempest_plugin/tests/scenario/test_fwaas.py | 4 ++-- .../tests/tempest_plugin/tests/scenario/test_fwaas_v2.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/neutron_fwaas/tests/tempest_plugin/tests/api/test_fwaas_extensions.py b/neutron_fwaas/tests/tempest_plugin/tests/api/test_fwaas_extensions.py index dbf5516bc..04bd20a0c 100644 --- a/neutron_fwaas/tests/tempest_plugin/tests/api/test_fwaas_extensions.py +++ b/neutron_fwaas/tests/tempest_plugin/tests/api/test_fwaas_extensions.py @@ -14,12 +14,12 @@ import six +from tempest.common import utils from tempest import config from tempest.lib.common.utils import data_utils from tempest.lib.common.utils import test_utils from tempest.lib import decorators from tempest.lib import exceptions as lib_exc -from tempest import test from neutron_fwaas.tests.tempest_plugin.tests.api import base @@ -56,7 +56,7 @@ class FWaaSExtensionTestJSON(base.BaseFWaaSTest): @classmethod def resource_setup(cls): super(FWaaSExtensionTestJSON, cls).resource_setup() - if not test.is_extension_enabled('fwaas', 'network'): + if not utils.is_extension_enabled('fwaas', 'network'): msg = "FWaaS Extension not enabled." raise cls.skipException(msg) diff --git a/neutron_fwaas/tests/tempest_plugin/tests/api/test_fwaasv2_extensions.py b/neutron_fwaas/tests/tempest_plugin/tests/api/test_fwaasv2_extensions.py index f059f9a1d..6278166f0 100644 --- a/neutron_fwaas/tests/tempest_plugin/tests/api/test_fwaasv2_extensions.py +++ b/neutron_fwaas/tests/tempest_plugin/tests/api/test_fwaasv2_extensions.py @@ -15,12 +15,12 @@ import netaddr import six +from tempest.common import utils from tempest import config from tempest.lib.common.utils import data_utils from tempest.lib.common.utils import test_utils from tempest.lib import decorators from tempest.lib import exceptions as lib_exc -from tempest import test from neutron_fwaas.common import fwaas_constants from neutron_fwaas.tests.tempest_plugin.tests.api import v2_base @@ -58,7 +58,7 @@ class FWaaSv2ExtensionTestJSON(v2_base.BaseFWaaSTest): @classmethod def resource_setup(cls): super(FWaaSv2ExtensionTestJSON, cls).resource_setup() - if not test.is_extension_enabled('fwaas_v2', 'network'): + if not utils.is_extension_enabled('fwaas_v2', 'network'): msg = "FWaaS v2 Extension not enabled." raise cls.skipException(msg) diff --git a/neutron_fwaas/tests/tempest_plugin/tests/scenario/test_fwaas.py b/neutron_fwaas/tests/tempest_plugin/tests/scenario/test_fwaas.py index 9d3a4d42c..bc2a976a3 100644 --- a/neutron_fwaas/tests/tempest_plugin/tests/scenario/test_fwaas.py +++ b/neutron_fwaas/tests/tempest_plugin/tests/scenario/test_fwaas.py @@ -15,9 +15,9 @@ import testscenarios +from tempest.common import utils from tempest import config from tempest.lib import decorators -from tempest import test from neutron_fwaas.tests.tempest_plugin.tests.scenario import base @@ -42,7 +42,7 @@ class TestFWaaS(base.FWaaSScenarioTest): if self.router_insertion: required_exts.append('fwaasrouterinsertion') for ext in required_exts: - if not test.is_extension_enabled(ext, 'network'): + if not utils.is_extension_enabled(ext, 'network'): msg = "%s Extension not enabled." % ext raise self.skipException(msg) self._router_ids = None diff --git a/neutron_fwaas/tests/tempest_plugin/tests/scenario/test_fwaas_v2.py b/neutron_fwaas/tests/tempest_plugin/tests/scenario/test_fwaas_v2.py index ad43a07c2..f9557fc40 100644 --- a/neutron_fwaas/tests/tempest_plugin/tests/scenario/test_fwaas_v2.py +++ b/neutron_fwaas/tests/tempest_plugin/tests/scenario/test_fwaas_v2.py @@ -17,11 +17,11 @@ import testscenarios from oslo_log import log as logging +from tempest.common import utils from tempest import config from tempest.lib.common.utils import test_utils from tempest.lib import decorators from tempest.lib import exceptions as lib_exc -from tempest import test from neutron_fwaas.tests.tempest_plugin.tests.scenario import base @@ -46,7 +46,7 @@ class TestFWaaS_v2(base.FWaaSScenarioTest_V2): # if self.router_insertion: # required_exts.append('fwaasrouterinsertion') for ext in required_exts: - if not test.is_extension_enabled(ext, 'network'): + if not utils.is_extension_enabled(ext, 'network'): msg = "%s Extension not enabled." % ext raise self.skipException(msg) LOG.debug("FWaaSScenarioTest Setup done.")