Remove the deprecated tempest.test.attr

[1] moves the attr decorator from test.py to tempest/lib. So, all the
references to tempest.test has to be moved to tempest.lib.decorator.

[2] https://review.openstack.org/#/c/456236/

Change-Id: If977e559d9f3b982baf2974efef3c5b375f263b9
This commit is contained in:
Ngo Quoc Cuong
2017-05-22 10:10:17 +07:00
parent 21994297cf
commit a4fac69d85
9 changed files with 60 additions and 60 deletions

View File

@@ -20,7 +20,7 @@ import collections
import functools
from tempest.lib.common.utils import test_utils
from tempest import test
from tempest.lib import decorators
from watcher_tempest_plugin.tests.api.admin import base
@@ -44,7 +44,7 @@ class TestShowListAction(base.BaseInfraOptimTest):
audit_uuid=cls.audit['uuid'])
cls.action_plan = action_plans['action_plans'][0]
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_show_one_action(self):
_, body = self.client.list_actions(
action_plan_uuid=self.action_plan["uuid"])
@@ -55,7 +55,7 @@ class TestShowListAction(base.BaseInfraOptimTest):
self.assertEqual(self.action_plan["uuid"], action['action_plan_uuid'])
self.assertEqual("PENDING", action['state'])
@test.attr(type='smoke')
@decorators.attr(type='smoke')
def test_show_action_with_links(self):
_, body = self.client.list_actions(
action_plan_uuid=self.action_plan["uuid"])
@@ -67,7 +67,7 @@ class TestShowListAction(base.BaseInfraOptimTest):
self.assertEqual(2, len(action['links']))
self.assertIn(action['uuid'], action['links'][0]['href'])
@test.attr(type="smoke")
@decorators.attr(type="smoke")
def test_list_actions(self):
_, body = self.client.list_actions()
@@ -76,7 +76,7 @@ class TestShowListAction(base.BaseInfraOptimTest):
self.validate_self_link('actions', action['uuid'],
action['links'][0]['href'])
@test.attr(type="smoke")
@decorators.attr(type="smoke")
def test_list_actions_by_action_plan(self):
_, body = self.client.list_actions(
action_plan_uuid=self.action_plan["uuid"])
@@ -93,7 +93,7 @@ class TestShowListAction(base.BaseInfraOptimTest):
self.assertEqual(2, action_counter.get("nop"))
self.assertEqual(1, action_counter.get("sleep"))
@test.attr(type="smoke")
@decorators.attr(type="smoke")
def test_list_actions_by_audit(self):
_, body = self.client.list_actions(audit_uuid=self.audit["uuid"])