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: I5be0cce4aafc9e088347f2a04f92395b1f5dfd31
This commit is contained in:
Nguyen Hung Phuong 2018-01-26 11:14:33 +07:00
parent 39ec972694
commit 9be8c71dcd
2 changed files with 4 additions and 4 deletions

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from tempest.common import utils
from tempest import config
from tempest.lib import decorators
from tempest import test
from neutron_taas.tests.tempest_plugin.tests.api import base
@ -27,7 +27,7 @@ class TaaSExtensionTestJSON(base.BaseTaaSTest):
@classmethod
def resource_setup(cls):
super(TaaSExtensionTestJSON, cls).resource_setup()
if not test.is_extension_enabled('taas', 'network'):
if not utils.is_extension_enabled('taas', 'network'):
msg = "TaaS Extension not enabled."
raise cls.skipException(msg)

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from tempest.common import utils
from tempest import config
from tempest.lib import decorators
from tempest import test
from neutron_taas.tests.tempest_plugin.tests.scenario import base
@ -28,7 +28,7 @@ class TestTaaS(base.TaaSScenarioTest):
def resource_setup(cls):
super(TestTaaS, cls).resource_setup()
for ext in ['taas']:
if not test.is_extension_enabled(ext, 'network'):
if not utils.is_extension_enabled(ext, 'network'):
msg = "%s Extension not enabled." % ext
raise cls.skipException(msg)