Merge "Convert to use tempest attr implementation 2/2"
diff --git a/tempest/testboto.py b/tempest/testboto.py
index 8bcaa33..1b768ef 100644
--- a/tempest/testboto.py
+++ b/tempest/testboto.py
@@ -122,7 +122,8 @@
return string + ")"
-class BotoTestCase(testtools.TestCase,
+class BotoTestCase(testtools.testcase.WithAttributes,
+ testtools.TestCase,
testresources.ResourcedTestCase):
"""Recommended to use as base class for boto related test."""
diff --git a/tempest/tests/boto/test_ec2_instance_run.py b/tempest/tests/boto/test_ec2_instance_run.py
index 1adb5fb..8358ef9 100644
--- a/tempest/tests/boto/test_ec2_instance_run.py
+++ b/tempest/tests/boto/test_ec2_instance_run.py
@@ -20,13 +20,13 @@
from boto.exception import EC2ResponseError
from boto.s3.key import Key
-from nose.plugins.attrib import attr
import testtools
from tempest import clients
from tempest.common.utils.data_utils import rand_name
from tempest.common.utils.linux.remote_client import RemoteClient
from tempest.exceptions import EC2RegisterImageException
+from tempest.test import attr
from tempest.testboto import BotoTestCase
import tempest.tests.boto
from tempest.tests.boto.utils.s3 import s3_upload_dir
diff --git a/tempest/tests/boto/test_ec2_keys.py b/tempest/tests/boto/test_ec2_keys.py
index dea895f..d96ee11 100644
--- a/tempest/tests/boto/test_ec2_keys.py
+++ b/tempest/tests/boto/test_ec2_keys.py
@@ -15,11 +15,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
import testtools
from tempest import clients
from tempest.common.utils.data_utils import rand_name
+from tempest.test import attr
from tempest.testboto import BotoTestCase
diff --git a/tempest/tests/boto/test_ec2_network.py b/tempest/tests/boto/test_ec2_network.py
index 76103c2..ef476a2 100644
--- a/tempest/tests/boto/test_ec2_network.py
+++ b/tempest/tests/boto/test_ec2_network.py
@@ -15,10 +15,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
import testtools
from tempest import clients
+from tempest.test import attr
from tempest.testboto import BotoTestCase
diff --git a/tempest/tests/boto/test_ec2_security_groups.py b/tempest/tests/boto/test_ec2_security_groups.py
index ed7bedb..5981408 100644
--- a/tempest/tests/boto/test_ec2_security_groups.py
+++ b/tempest/tests/boto/test_ec2_security_groups.py
@@ -15,11 +15,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
import testtools
from tempest import clients
from tempest.common.utils.data_utils import rand_name
+from tempest.test import attr
from tempest.testboto import BotoTestCase
diff --git a/tempest/tests/boto/test_ec2_volumes.py b/tempest/tests/boto/test_ec2_volumes.py
index 7397cdb..7d3c5ab 100644
--- a/tempest/tests/boto/test_ec2_volumes.py
+++ b/tempest/tests/boto/test_ec2_volumes.py
@@ -18,10 +18,10 @@
import logging
import time
-from nose.plugins.attrib import attr
import testtools
from tempest import clients
+from tempest.test import attr
from tempest.testboto import BotoTestCase
LOG = logging.getLogger(__name__)
diff --git a/tempest/tests/boto/test_s3_buckets.py b/tempest/tests/boto/test_s3_buckets.py
index 36aa319..a4d1927 100644
--- a/tempest/tests/boto/test_s3_buckets.py
+++ b/tempest/tests/boto/test_s3_buckets.py
@@ -15,11 +15,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
import testtools
from tempest import clients
from tempest.common.utils.data_utils import rand_name
+from tempest.test import attr
from tempest.testboto import BotoTestCase
diff --git a/tempest/tests/boto/test_s3_ec2_images.py b/tempest/tests/boto/test_s3_ec2_images.py
index e0dc124..da248e1 100644
--- a/tempest/tests/boto/test_s3_ec2_images.py
+++ b/tempest/tests/boto/test_s3_ec2_images.py
@@ -19,11 +19,11 @@
import os
from boto.s3.key import Key
-from nose.plugins.attrib import attr
import testtools
from tempest import clients
from tempest.common.utils.data_utils import rand_name
+from tempest.test import attr
from tempest.testboto import BotoTestCase
import tempest.tests.boto
from tempest.tests.boto.utils.s3 import s3_upload_dir
diff --git a/tempest/tests/boto/test_s3_objects.py b/tempest/tests/boto/test_s3_objects.py
index cacd99f..e7bc4b1 100644
--- a/tempest/tests/boto/test_s3_objects.py
+++ b/tempest/tests/boto/test_s3_objects.py
@@ -18,11 +18,11 @@
from contextlib import closing
from boto.s3.key import Key
-from nose.plugins.attrib import attr
import testtools
from tempest import clients
from tempest.common.utils.data_utils import rand_name
+from tempest.test import attr
from tempest.testboto import BotoTestCase
from tempest.tests import boto
diff --git a/tempest/tests/compute/base.py b/tempest/tests/compute/base.py
index 3810046..f2af1fc 100644
--- a/tempest/tests/compute/base.py
+++ b/tempest/tests/compute/base.py
@@ -33,7 +33,8 @@
LOG = logging.getLogger(__name__)
-class BaseCompTest(testtools.TestCase,
+class BaseCompTest(testtools.testcase.WithAttributes,
+ testtools.TestCase,
testresources.ResourcedTestCase):
"""Base test case class for all Compute API tests."""
diff --git a/tempest/tests/identity/admin/test_services.py b/tempest/tests/identity/admin/test_services.py
index b74266c..0246f8c 100644
--- a/tempest/tests/identity/admin/test_services.py
+++ b/tempest/tests/identity/admin/test_services.py
@@ -16,10 +16,9 @@
# under the License.
-from nose.plugins.attrib import attr
-
from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
+from tempest.test import attr
from tempest.tests.identity import base
diff --git a/tempest/tests/identity/admin/test_tenants.py b/tempest/tests/identity/admin/test_tenants.py
index 54383f1..9321b07 100644
--- a/tempest/tests/identity/admin/test_tenants.py
+++ b/tempest/tests/identity/admin/test_tenants.py
@@ -17,9 +17,9 @@
import testtools
-from nose.plugins.attrib import attr
from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
+from tempest.test import attr
from tempest.tests.identity import base
diff --git a/tempest/tests/identity/admin/test_users.py b/tempest/tests/identity/admin/test_users.py
index ef7d934..8396b91 100644
--- a/tempest/tests/identity/admin/test_users.py
+++ b/tempest/tests/identity/admin/test_users.py
@@ -15,9 +15,9 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
+from tempest.test import attr
from tempest.tests.identity import base
import testtools
from testtools.matchers._basic import Contains
diff --git a/tempest/tests/identity/base.py b/tempest/tests/identity/base.py
index cbd943e..fbff88f 100644
--- a/tempest/tests/identity/base.py
+++ b/tempest/tests/identity/base.py
@@ -21,7 +21,8 @@
from tempest.common.utils.data_utils import rand_name
-class BaseIdAdminTest(testtools.TestCase):
+class BaseIdAdminTest(testtools.testcase.WithAttributes,
+ testtools.TestCase):
@classmethod
def setUpClass(cls):
diff --git a/tempest/tests/image/test_images.py b/tempest/tests/image/test_images.py
index 0a1a25f..b8bc1c5 100644
--- a/tempest/tests/image/test_images.py
+++ b/tempest/tests/image/test_images.py
@@ -20,7 +20,7 @@
import testtools
-from nose.plugins.attrib import attr
+from tempest.test import attr
GLANCE_INSTALLED = False
@@ -33,7 +33,8 @@
from tempest import clients
-class CreateRegisterImagesTest(testtools.TestCase):
+class CreateRegisterImagesTest(testtools.testcase.WithAttributes,
+ testtools.TestCase):
"""
Here we test the registration and creation of images
@@ -128,7 +129,8 @@
self.assertEqual('active', results.status)
-class ListImagesTest(testtools.TestCase):
+class ListImagesTest(testtools.testcase.WithAttributes,
+ testtools.TestCase):
"""
Here we test the listing of image information
diff --git a/tempest/tests/network/base.py b/tempest/tests/network/base.py
index 01330cc..5af7e2c 100644
--- a/tempest/tests/network/base.py
+++ b/tempest/tests/network/base.py
@@ -22,7 +22,8 @@
from tempest import exceptions
-class BaseNetworkTest(testtools.TestCase):
+class BaseNetworkTest(testtools.testcase.WithAttributes,
+ testtools.TestCase):
@classmethod
def setUpClass(cls):
diff --git a/tempest/tests/network/test_networks.py b/tempest/tests/network/test_networks.py
index d7f09c4..136279f 100644
--- a/tempest/tests/network/test_networks.py
+++ b/tempest/tests/network/test_networks.py
@@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
+from tempest.test import attr
from tempest.common.utils.data_utils import rand_name
from tempest.tests.network import base
diff --git a/tempest/tests/object_storage/base.py b/tempest/tests/object_storage/base.py
index 8c32ffc..376deb7 100644
--- a/tempest/tests/object_storage/base.py
+++ b/tempest/tests/object_storage/base.py
@@ -23,7 +23,8 @@
from tempest.tests.identity.base import DataGenerator
-class BaseObjectTest(testtools.TestCase):
+class BaseObjectTest(testtools.testcase.WithAttributes,
+ testtools.TestCase):
@classmethod
def setUpClass(cls):
diff --git a/tempest/tests/object_storage/test_account_services.py b/tempest/tests/object_storage/test_account_services.py
index e34e349..14f94f7 100644
--- a/tempest/tests/object_storage/test_account_services.py
+++ b/tempest/tests/object_storage/test_account_services.py
@@ -15,9 +15,9 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
+from tempest.test import attr
from tempest.tests.object_storage import base
diff --git a/tempest/tests/object_storage/test_container_services.py b/tempest/tests/object_storage/test_container_services.py
index fe09341..2c5b1ff 100644
--- a/tempest/tests/object_storage/test_container_services.py
+++ b/tempest/tests/object_storage/test_container_services.py
@@ -15,10 +15,9 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
-
from tempest.common.utils.data_utils import arbitrary_string
from tempest.common.utils.data_utils import rand_name
+from tempest.test import attr
from tempest.tests.object_storage import base
diff --git a/tempest/tests/object_storage/test_container_sync.py b/tempest/tests/object_storage/test_container_sync.py
index f156f45..f087aff 100644
--- a/tempest/tests/object_storage/test_container_sync.py
+++ b/tempest/tests/object_storage/test_container_sync.py
@@ -15,9 +15,9 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
from tempest.common.utils.data_utils import arbitrary_string
from tempest.common.utils.data_utils import rand_name
+from tempest.test import attr
from tempest.tests.object_storage import base
import testtools
import time
diff --git a/tempest/tests/object_storage/test_object_expiry.py b/tempest/tests/object_storage/test_object_expiry.py
index 8e6b23b..1738ddf 100644
--- a/tempest/tests/object_storage/test_object_expiry.py
+++ b/tempest/tests/object_storage/test_object_expiry.py
@@ -15,10 +15,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
from tempest.common.utils.data_utils import arbitrary_string
from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
+from tempest.test import attr
from tempest.tests.object_storage import base
import testtools
from time import sleep
diff --git a/tempest/tests/object_storage/test_object_services.py b/tempest/tests/object_storage/test_object_services.py
index d5b6d5c..e0a2fbb 100644
--- a/tempest/tests/object_storage/test_object_services.py
+++ b/tempest/tests/object_storage/test_object_services.py
@@ -15,11 +15,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
-
from tempest.common.utils.data_utils import arbitrary_string
from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
+from tempest.test import attr
from tempest.tests.object_storage import base
import testtools
from time import time
diff --git a/tempest/tests/object_storage/test_object_version.py b/tempest/tests/object_storage/test_object_version.py
index 28e0893..bc1c045 100644
--- a/tempest/tests/object_storage/test_object_version.py
+++ b/tempest/tests/object_storage/test_object_version.py
@@ -15,8 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
from tempest.common.utils.data_utils import rand_name
+from tempest.test import attr
from tempest.tests.object_storage import base
diff --git a/tempest/tests/volume/base.py b/tempest/tests/volume/base.py
index 49918e8..6625180 100644
--- a/tempest/tests/volume/base.py
+++ b/tempest/tests/volume/base.py
@@ -28,7 +28,8 @@
LOG = logging.getLogger(__name__)
-class BaseVolumeTest(testtools.TestCase):
+class BaseVolumeTest(testtools.testcase.WithAttributes,
+ testtools.TestCase):
"""Base test case class for all Cinder API tests."""
diff --git a/tempest/tests/volume/test_volumes_actions.py b/tempest/tests/volume/test_volumes_actions.py
index dd93b89..fb9b975 100644
--- a/tempest/tests/volume/test_volumes_actions.py
+++ b/tempest/tests/volume/test_volumes_actions.py
@@ -15,9 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
-
from tempest.common.utils.data_utils import rand_name
+from tempest.test import attr
from tempest.tests.volume.base import BaseVolumeTest
diff --git a/tempest/tests/volume/test_volumes_get.py b/tempest/tests/volume/test_volumes_get.py
index bc64ff4..bd271ed 100644
--- a/tempest/tests/volume/test_volumes_get.py
+++ b/tempest/tests/volume/test_volumes_get.py
@@ -15,9 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
-
from tempest.common.utils.data_utils import rand_name
+from tempest.test import attr
from tempest.tests.volume import base
diff --git a/tempest/tests/volume/test_volumes_list.py b/tempest/tests/volume/test_volumes_list.py
index 92d3d3f..64691d4 100644
--- a/tempest/tests/volume/test_volumes_list.py
+++ b/tempest/tests/volume/test_volumes_list.py
@@ -15,10 +15,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import nose
-from nose.plugins.attrib import attr
-
from tempest.common.utils.data_utils import rand_name
+from tempest.test import attr
from tempest.tests.volume import base
diff --git a/tempest/tests/volume/test_volumes_snapshots.py b/tempest/tests/volume/test_volumes_snapshots.py
index 1e87525..75ea155 100644
--- a/tempest/tests/volume/test_volumes_snapshots.py
+++ b/tempest/tests/volume/test_volumes_snapshots.py
@@ -12,8 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from nose.plugins.attrib import attr
-
from tempest.common.utils.data_utils import rand_name
from tempest.tests.volume import base