Move the `attr` decorator from test.py to tempest/lib
I think it's a good idea to move all utility decorators into
tempest/lib/decorators.py. This patch does that for the `attr`
decorator.
Change-Id: Iaafbb112b6eee458089cc49918359a8a8d0485e2
diff --git a/tempest/api/identity/v2/test_api_discovery.py b/tempest/api/identity/v2/test_api_discovery.py
index 02caef5..5b9d38c 100644
--- a/tempest/api/identity/v2/test_api_discovery.py
+++ b/tempest/api/identity/v2/test_api_discovery.py
@@ -15,13 +15,12 @@
from tempest.api.identity import base
from tempest.lib import decorators
-from tempest import test
class TestApiDiscovery(base.BaseIdentityV2Test):
"""Tests for API discovery features."""
- @test.attr(type='smoke')
+ @decorators.attr(type='smoke')
@decorators.idempotent_id('ea889a68-a15f-4166-bfb1-c12456eae853')
def test_api_version_resources(self):
descr = self.non_admin_client.show_api_description()['version']
@@ -32,7 +31,7 @@
for res in expected_resources:
self.assertIn(res, keys)
- @test.attr(type='smoke')
+ @decorators.attr(type='smoke')
@decorators.idempotent_id('007a0be0-78fe-4fdb-bbee-e9216cc17bb2')
def test_api_media_types(self):
descr = self.non_admin_client.show_api_description()['version']
@@ -47,7 +46,7 @@
for s_type in supported_types:
self.assertIn(s_type, media_types)
- @test.attr(type='smoke')
+ @decorators.attr(type='smoke')
@decorators.idempotent_id('77fd6be0-8801-48e6-b9bf-38cdd2f253ec')
def test_api_version_statuses(self):
descr = self.non_admin_client.show_api_description()['version']