Use testtools as the base testcase class.

Use testtools as the base unittest test case class towards to
parallelizing the test runs. Catch places where setUp and tearDown
were not being chained properly, and fix these problems.Remove
custom skip, using testtools.skip instead. Add TestResourceManager.

Part of blueprint speed-up-tempest

Change-Id: I8e7b5686b22969a0f3db96100a357c93a4d5c03f
diff --git a/tempest/tests/compute/__init__.py b/tempest/tests/compute/__init__.py
index 398f982..08e5091 100644
--- a/tempest/tests/compute/__init__.py
+++ b/tempest/tests/compute/__init__.py
@@ -17,11 +17,11 @@
 
 import logging
 
-import nose
 
 from tempest import clients
 from tempest import config
 from tempest.exceptions import InvalidConfiguration
+from testresources import TestResourceManager
 
 LOG = logging.getLogger(__name__)
 
@@ -80,3 +80,8 @@
                        % (user2_tenant_name, user2_password))
                 raise InvalidConfiguration(msg)
             MULTI_USER = True
+
+
+class ComputeResource(TestResourceManager):
+    def make(self, dependency_resources=None):
+        return generic_setup_package()
diff --git a/tempest/tests/compute/admin/test_flavors.py b/tempest/tests/compute/admin/test_flavors.py
index 4859308..eb2392c 100644
--- a/tempest/tests/compute/admin/test_flavors.py
+++ b/tempest/tests/compute/admin/test_flavors.py
@@ -15,9 +15,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import nose
 from nose.plugins.attrib import attr
-import unittest2 as unittest
+import testtools
 
 from tempest.common.utils.data_utils import rand_int_id
 from tempest.common.utils.data_utils import rand_name
@@ -35,7 +34,7 @@
     def setUpClass(self, cls):
         if not compute.FLAVOR_EXTRA_DATA_ENABLED:
             msg = "FlavorExtraData extension not enabled."
-            raise nose.SkipTest(msg)
+            raise cls.skipException(msg)
 
         cls.client = cls.os.flavors_client
         cls.flavor_name_prefix = 'test_flavor_'
diff --git a/tempest/tests/compute/admin/test_quotas.py b/tempest/tests/compute/admin/test_quotas.py
index 2c2e5da..6a7a5ea 100644
--- a/tempest/tests/compute/admin/test_quotas.py
+++ b/tempest/tests/compute/admin/test_quotas.py
@@ -57,12 +57,13 @@
                                  'cores': 20, 'security_groups': 10}
 
     @classmethod
-    def tearDown(cls):
+    def tearDownClass(cls):
         for server in cls.servers:
             try:
                 cls.servers_client.delete_server(server['id'])
             except exceptions.NotFound:
                 continue
+        super(QuotasTest, cls).tearDownClass()
 
     @attr(type='smoke')
     def test_get_default_quotas(self):
diff --git a/tempest/tests/compute/base.py b/tempest/tests/compute/base.py
index 9e2e883..2312931 100644
--- a/tempest/tests/compute/base.py
+++ b/tempest/tests/compute/base.py
@@ -18,9 +18,8 @@
 import logging
 import time
 
-import nose
 import testresources
-import unittest2 as unittest
+import testtools
 
 from tempest import clients
 from tempest.common.utils.data_utils import rand_name
@@ -34,12 +33,11 @@
 LOG = logging.getLogger(__name__)
 
 
-class BaseCompTest(unittest.TestCase,
+class BaseCompTest(testtools.TestCase,
                    testresources.ResourcedTestCase):
-
     """Base test case class for all Compute API tests."""
 
-    resources = [('compute_init', compute.generic_setup_package())]
+    resources = [('compute_init', compute.ComputeResource())]
 
     @classmethod
     def setUpClass(cls):
@@ -249,7 +247,7 @@
         super(BaseComputeTestXML, cls).setUpClass()
 
 
-class BaseComputeAdminTest(unittest.TestCase):
+class BaseComputeAdminTest(testtools.TestCase):
 
     """Base test case class for all Compute Admin API tests."""
 
@@ -263,7 +261,7 @@
         if not cls.admin_username and cls.admin_password and cls.admin_tenant:
             msg = ("Missing Compute Admin API credentials "
                    "in configuration.")
-            raise nose.SkipTest(msg)
+            raise cls.skipException(msg)
 
         cls.os = clients.ComputeAdminManager(interface=cls._interface)
 
diff --git a/tempest/tests/compute/floating_ips/test_floating_ips_actions.py b/tempest/tests/compute/floating_ips/test_floating_ips_actions.py
index 9a9914a..59faf66 100644
--- a/tempest/tests/compute/floating_ips/test_floating_ips_actions.py
+++ b/tempest/tests/compute/floating_ips/test_floating_ips_actions.py
@@ -16,7 +16,7 @@
 #    under the License.
 
 from nose.plugins.attrib import attr
-import unittest2 as unittest
+import testtools
 
 from tempest import clients
 from tempest.common.utils.data_utils import rand_name
diff --git a/tempest/tests/compute/floating_ips/test_list_floating_ips.py b/tempest/tests/compute/floating_ips/test_list_floating_ips.py
index 9eec27c..ea99e89 100644
--- a/tempest/tests/compute/floating_ips/test_list_floating_ips.py
+++ b/tempest/tests/compute/floating_ips/test_list_floating_ips.py
@@ -16,7 +16,7 @@
 #    under the License.
 
 from nose.plugins.attrib import attr
-import unittest2 as unittest
+import testtools
 
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
diff --git a/tempest/tests/compute/images/test_image_metadata.py b/tempest/tests/compute/images/test_image_metadata.py
index cdf4249..94bdca7 100644
--- a/tempest/tests/compute/images/test_image_metadata.py
+++ b/tempest/tests/compute/images/test_image_metadata.py
@@ -53,6 +53,7 @@
         super(ImagesMetadataTest, cls).tearDownClass()
 
     def setUp(self):
+        super(ImagesMetadataTest, self).setUp()
         meta = {'key1': 'value1', 'key2': 'value2'}
         resp, _ = self.client.set_image_metadata(self.image_id, meta)
         self.assertEqual(resp.status, 200)
diff --git a/tempest/tests/compute/images/test_images.py b/tempest/tests/compute/images/test_images.py
index 2557f16..1fc03b8 100644
--- a/tempest/tests/compute/images/test_images.py
+++ b/tempest/tests/compute/images/test_images.py
@@ -15,9 +15,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import nose
 from nose.plugins.attrib import attr
-import unittest2 as unittest
+import testtools
 
 from tempest import clients
 from tempest.common.utils.data_utils import parse_image_id
@@ -113,7 +112,7 @@
         self.assertRaises(exceptions.Duplicate, self.client.create_image,
                           server['id'], snapshot_name)
 
-    @unittest.skip("Until Bug 1039739 is fixed")
+    @testtools.skip("Until Bug 1039739 is fixed")
     @attr(type='negative')
     def test_create_image_when_server_is_rebooting(self):
         # Return error when creating an image of server that is rebooting
@@ -217,6 +216,7 @@
                      ImagesTestBase):
     def tearDown(self):
         ImagesTestBase.tearDown(self)
+        base.BaseComputeTestJSON.tearDown(self)
 
     @classmethod
     def setUpClass(cls):
@@ -243,6 +243,7 @@
                     ImagesTestBase):
     def tearDown(self):
         ImagesTestBase.tearDown(self)
+        base.BaseComputeTestXML.tearDown(self)
 
     @classmethod
     def setUpClass(cls):
diff --git a/tempest/tests/compute/images/test_images_oneserver.py b/tempest/tests/compute/images/test_images_oneserver.py
index f8b560b..f3b1e01 100644
--- a/tempest/tests/compute/images/test_images_oneserver.py
+++ b/tempest/tests/compute/images/test_images_oneserver.py
@@ -15,9 +15,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import nose
 from nose.plugins.attrib import attr
-import unittest2 as unittest
+import testtools
 
 from tempest import clients
 from tempest.common.utils.data_utils import parse_image_id
@@ -43,7 +42,7 @@
             self.image_ids.remove(image_id)
 
     @attr(type='negative')
-    @unittest.skip("Until Bug 1006725 is fixed")
+    @testtools.skip("Until Bug 1006725 is fixed")
     def test_create_image_specify_multibyte_character_image_name(self):
         # Return an error if the image name has multi-byte characters
         try:
@@ -56,7 +55,7 @@
                       " are used for image name")
 
     @attr(type='negative')
-    @unittest.skip("Until Bug 1005423 is fixed")
+    @testtools.skip("Until Bug 1005423 is fixed")
     def test_create_image_specify_invalid_metadata(self):
         # Return an error when creating image with invalid metadata
         try:
@@ -69,7 +68,7 @@
             self.fail("Should raise 400 Bad Request if meta data is invalid")
 
     @attr(type='negative')
-    @unittest.skip("Until Bug 1005423 is fixed")
+    @testtools.skip("Until Bug 1005423 is fixed")
     def test_create_image_specify_metadata_over_limits(self):
         # Return an error when creating image with meta data over 256 chars
         try:
@@ -82,8 +81,8 @@
             self.fail("Should raise 413 Over Limit if meta data was too long")
 
     @attr(type='negative')
-    @unittest.skipUnless(compute.MULTI_USER,
-                         'Need multiple users for this test.')
+    @testtools.skipUnless(compute.MULTI_USER,
+                          'Need multiple users for this test.')
     def test_delete_image_of_another_tenant(self):
         # Return an error while trying to delete another tenant's image
         self.servers_client.wait_for_server_status(self.server['id'], 'ACTIVE')
@@ -99,8 +98,8 @@
                           self.alt_client.delete_image, image_id)
 
     @attr(type='smoke')
-    @unittest.skipUnless(compute.CREATE_IMAGE_ENABLED,
-                         'Environment unable to create images.')
+    @testtools.skipUnless(compute.CREATE_IMAGE_ENABLED,
+                          'Environment unable to create images.')
     def test_create_delete_image(self):
 
         # Create a new image
@@ -123,8 +122,8 @@
         self.assertEqual(original_image['minDisk'], image['minDisk'])
 
     @attr(type='negative')
-    @unittest.skipUnless(compute.MULTI_USER,
-                         'Need multiple users for this test.')
+    @testtools.skipUnless(compute.MULTI_USER,
+                          'Need multiple users for this test.')
     def test_create_image_for_server_in_another_tenant(self):
         # Creating image of another tenant's server should be return error
 
@@ -157,7 +156,7 @@
                       "of the server is still being saved")
 
     @attr(type='negative')
-    @unittest.skip("Until Bug 1004564 is fixed")
+    @testtools.skip("Until Bug 1004564 is fixed")
     def test_create_image_specify_name_over_256_chars(self):
         # Return an error if snapshot name over 256 characters is passed
 
@@ -192,6 +191,7 @@
 
     def tearDown(self):
         ImagesOneServerTestBase.tearDown(self)
+        base.BaseComputeTestJSON.tearDown(self)
 
     @classmethod
     def setUpClass(cls):
@@ -220,6 +220,7 @@
 
     def tearDown(self):
         ImagesOneServerTestBase.tearDown(self)
+        base.BaseComputeTestXML.tearDown(self)
 
     @classmethod
     def setUpClass(cls):
diff --git a/tempest/tests/compute/keypairs/test_keypairs.py b/tempest/tests/compute/keypairs/test_keypairs.py
index 7d95a9b..45c9079 100644
--- a/tempest/tests/compute/keypairs/test_keypairs.py
+++ b/tempest/tests/compute/keypairs/test_keypairs.py
@@ -16,7 +16,7 @@
 #    under the License.
 
 from nose.plugins.attrib import attr
-import unittest2 as unittest
+import testtools
 
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
@@ -77,7 +77,7 @@
         self.assertEqual(202, resp.status)
 
     @attr(type='positive')
-    @unittest.skip("Skipped until the Bug #980688 is resolved")
+    @testtools.skip("Skipped until the Bug #980688 is resolved")
     def test_get_keypair_detail(self):
         # Keypair should be created, Got details by name and deleted
         k_name = rand_name('keypair-')
@@ -137,7 +137,7 @@
             self.fail('Expected BadRequest for invalid public key')
 
     @attr(type='negative')
-    @unittest.skip("Skipped until the Bug #1086980 is resolved")
+    @testtools.skip("Skipped until the Bug #1086980 is resolved")
     def test_keypair_delete_nonexistant_key(self):
         # Non-existant key deletion should throw a proper error
         k_name = rand_name("keypair-non-existant-")
diff --git a/tempest/tests/compute/limits/test_absolute_limits.py b/tempest/tests/compute/limits/test_absolute_limits.py
index 89c5b25..d520b92 100644
--- a/tempest/tests/compute/limits/test_absolute_limits.py
+++ b/tempest/tests/compute/limits/test_absolute_limits.py
@@ -15,7 +15,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import unittest2 as unittest
+import testtools
 
 from tempest.tests.compute import base
 
@@ -26,7 +26,7 @@
     def setUpClass(cls):
         cls.client = cls.limits_client
 
-    @unittest.skip("Skipped until the Bug #1025294 is resolved")
+    @testtools.skip("Skipped until the Bug #1025294 is resolved")
     def test_absLimits_get(self):
         # To check if all limits are present in the response
         resp, absolute_limits = self.client.get_absolute_limits()
diff --git a/tempest/tests/compute/servers/test_console_output.py b/tempest/tests/compute/servers/test_console_output.py
index 3ad29a1..b26220b 100644
--- a/tempest/tests/compute/servers/test_console_output.py
+++ b/tempest/tests/compute/servers/test_console_output.py
@@ -16,7 +16,7 @@
 #    under the License.
 
 from nose.plugins.attrib import attr
-import unittest2 as unittest
+import testtools
 
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
@@ -63,7 +63,7 @@
             pass
 
     @attr(type='positive')
-    @unittest.skip('Until tempest bug 1014683 is fixed.')
+    @testtools.skip('Until tempest bug 1014683 is fixed.')
     def test_get_console_output_server_id_in_reboot_status(self):
         # Positive test:Should be able to GET the console output
         # for a given server_id in reboot status
diff --git a/tempest/tests/compute/servers/test_create_server.py b/tempest/tests/compute/servers/test_create_server.py
index c5a54dc..0dcc79f 100644
--- a/tempest/tests/compute/servers/test_create_server.py
+++ b/tempest/tests/compute/servers/test_create_server.py
@@ -16,10 +16,9 @@
 #    under the License.
 
 import base64
-import nose
 
 from nose.plugins.attrib import attr
-import unittest2 as unittest
+import testtools
 
 
 from tempest.common.utils.data_utils import rand_name
@@ -98,14 +97,14 @@
         self.assertTrue(found)
 
     @attr(type='positive')
-    @unittest.skipIf(not run_ssh, 'Instance validation tests are disabled.')
+    @testtools.skipIf(not run_ssh, 'Instance validation tests are disabled.')
     def test_can_log_into_created_server(self):
         # Check that the user can authenticate with the generated password
         linux_client = RemoteClient(self.server, self.ssh_user, self.password)
         self.assertTrue(linux_client.can_authenticate())
 
     @attr(type='positive')
-    @unittest.skipIf(not run_ssh, 'Instance validation tests are disabled.')
+    @testtools.skipIf(not run_ssh, 'Instance validation tests are disabled.')
     def test_verify_created_server_vcpus(self):
         # Verify that the number of vcpus reported by the instance matches
         # the amount stated by the flavor
@@ -114,7 +113,7 @@
         self.assertEqual(flavor['vcpus'], linux_client.get_number_of_vcpus())
 
     @attr(type='positive')
-    @unittest.skipIf(not run_ssh, 'Instance validation tests are disabled.')
+    @testtools.skipIf(not run_ssh, 'Instance validation tests are disabled.')
     def test_host_name_is_same_as_server_name(self):
         # Verify the instance host name is the same as the server name
         linux_client = RemoteClient(self.server, self.ssh_user, self.password)
@@ -128,7 +127,7 @@
     def setUpClass(cls):
         if not compute.DISK_CONFIG_ENABLED:
             msg = "DiskConfig extension not enabled."
-            raise nose.SkipTest(msg)
+            raise cls.skipException(msg)
         super(ServersTestAutoDisk, cls).setUpClass()
         cls.disk_config = 'AUTO'
         ServersTest.setUpClass(cls)
@@ -146,7 +145,7 @@
     def setUpClass(cls):
         if not compute.DISK_CONFIG_ENABLED:
             msg = "DiskConfig extension not enabled."
-            raise nose.SkipTest(msg)
+            raise cls.skipException(msg)
         super(ServersTestManualDisk, cls).setUpClass()
         cls.disk_config = 'MANUAL'
         ServersTest.setUpClass(cls)
diff --git a/tempest/tests/compute/servers/test_disk_config.py b/tempest/tests/compute/servers/test_disk_config.py
index 490156b..c3a37ff 100644
--- a/tempest/tests/compute/servers/test_disk_config.py
+++ b/tempest/tests/compute/servers/test_disk_config.py
@@ -15,9 +15,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import nose
 from nose.plugins.attrib import attr
-import unittest2 as unittest
+import testtools
 
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
@@ -31,7 +30,7 @@
     def setUpClass(cls):
         if not compute.DISK_CONFIG_ENABLED:
             msg = "DiskConfig extension not enabled."
-            raise nose.SkipTest(msg)
+            raise cls.skipException(msg)
         super(TestServerDiskConfig, cls).setUpClass()
         cls.client = cls.os.servers_client
 
@@ -96,7 +95,7 @@
         resp, body = self.client.delete_server(server['id'])
 
     @attr(type='positive')
-    @unittest.skipUnless(compute.RESIZE_AVAILABLE, 'Resize not available.')
+    @testtools.skipUnless(compute.RESIZE_AVAILABLE, 'Resize not available.')
     def test_resize_server_from_manual_to_auto(self):
         # A server should be resized from manual to auto disk config
         name = rand_name('server')
@@ -122,7 +121,7 @@
         resp, body = self.client.delete_server(server['id'])
 
     @attr(type='positive')
-    @unittest.skipUnless(compute.RESIZE_AVAILABLE, 'Resize not available.')
+    @testtools.skipUnless(compute.RESIZE_AVAILABLE, 'Resize not available.')
     def test_resize_server_from_auto_to_manual(self):
         # A server should be resized from auto to manual disk config
         name = rand_name('server')
diff --git a/tempest/tests/compute/servers/test_list_server_filters.py b/tempest/tests/compute/servers/test_list_server_filters.py
index d943e5d..45ea3a0 100644
--- a/tempest/tests/compute/servers/test_list_server_filters.py
+++ b/tempest/tests/compute/servers/test_list_server_filters.py
@@ -16,10 +16,8 @@
 #    under the License.
 
 
-import nose
 from nose.plugins.attrib import attr
-import nose.plugins.skip
-import unittest2 as unittest
+import testtools
 
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
diff --git a/tempest/tests/compute/servers/test_list_servers_negative.py b/tempest/tests/compute/servers/test_list_servers_negative.py
index 035ffe8..eb4ea02 100644
--- a/tempest/tests/compute/servers/test_list_servers_negative.py
+++ b/tempest/tests/compute/servers/test_list_servers_negative.py
@@ -18,8 +18,7 @@
 import re
 import sys
 
-import nose
-import unittest2 as unittest
+import testtools
 
 from tempest import clients
 from tempest.common.utils.data_utils import rand_name
@@ -64,7 +63,7 @@
             tenant_name = cls.os.tenant_name
             msg = ("User/tenant %(username)s/%(tenant_name)s already have "
                    "existing server instances. Skipping test.") % locals()
-            raise nose.SkipTest(msg)
+            raise cls.skipException(msg)
 
         resp, body = cls.alt_client.list_servers()
         servers = body['servers']
@@ -74,7 +73,7 @@
             tenant_name = cls.alt_manager.tenant_name
             msg = ("Alt User/tenant %(username)s/%(tenant_name)s already have "
                    "existing server instances. Skipping test.") % locals()
-            raise nose.SkipTest(msg)
+            raise cls.skipException(msg)
 
         # The following servers are created for use
         # by the test methods in this class. These
diff --git a/tempest/tests/compute/servers/test_server_actions.py b/tempest/tests/compute/servers/test_server_actions.py
index 2fe8464..fd35461 100644
--- a/tempest/tests/compute/servers/test_server_actions.py
+++ b/tempest/tests/compute/servers/test_server_actions.py
@@ -19,7 +19,7 @@
 import time
 
 from nose.plugins.attrib import attr
-import unittest2 as unittest
+import testtools
 
 from tempest.common.utils.data_utils import rand_name
 from tempest.common.utils.linux.remote_client import RemoteClient
@@ -35,8 +35,8 @@
     run_ssh = tempest.config.TempestConfig().compute.run_ssh
 
     @attr(type='smoke')
-    @unittest.skipUnless(compute.CHANGE_PASSWORD_AVAILABLE,
-                         'Change password not available.')
+    @testtools.skipUnless(compute.CHANGE_PASSWORD_AVAILABLE,
+                          'Change password not available.')
     def test_change_server_password(self):
         # The server's password should be set to the provided password
         new_password = 'Newpass1234'
@@ -70,7 +70,7 @@
             self.assertGreater(new_boot_time, boot_time)
 
     @attr(type='smoke')
-    @unittest.skip('Until bug 1014647 is dealt with.')
+    @testtools.skip('Until bug 1014647 is dealt with.')
     def test_reboot_server_soft(self):
         # The server should be signaled to reboot gracefully
         if self.run_ssh:
@@ -123,7 +123,7 @@
             self.assertTrue(linux_client.can_authenticate())
 
     @attr(type='smoke')
-    @unittest.skipIf(not resize_available, 'Resize not available.')
+    @testtools.skipIf(not resize_available, 'Resize not available.')
     def test_resize_server_confirm(self):
         # The server's RAM and disk space should be modified to that of
         # the provided flavor
@@ -139,7 +139,7 @@
         self.assertEqual(self.flavor_ref_alt, server['flavor']['id'])
 
     @attr(type='positive')
-    @unittest.skipIf(not resize_available, 'Resize not available.')
+    @testtools.skipIf(not resize_available, 'Resize not available.')
     def test_resize_server_revert(self):
         # The server's RAM and disk space should return to its original
         # values after a resize is reverted
diff --git a/tempest/tests/compute/servers/test_server_advanced_ops.py b/tempest/tests/compute/servers/test_server_advanced_ops.py
index 4e85b04..f949f2e 100644
--- a/tempest/tests/compute/servers/test_server_advanced_ops.py
+++ b/tempest/tests/compute/servers/test_server_advanced_ops.py
@@ -17,7 +17,6 @@
 
 import logging
 
-import nose
 
 from tempest.common.utils.data_utils import rand_name
 from tempest import test
@@ -39,13 +38,13 @@
 
         if not cls.config.compute.resize_available:
             msg = "Skipping test - resize not available on this host"
-            raise nose.SkipTest(msg)
+            raise cls.skipException(msg)
 
         resize_flavor = cls.config.compute.flavor_ref_alt
 
         if resize_flavor == cls.config.compute.flavor_ref:
             msg = "Skipping test - flavor_ref and flavor_ref_alt are identical"
-            raise nose.SkipTest(msg)
+            raise cls.skipException(msg)
 
     @classmethod
     def tearDownClass(cls):
diff --git a/tempest/tests/compute/servers/test_server_metadata.py b/tempest/tests/compute/servers/test_server_metadata.py
index 6c44c3c..7db963e 100644
--- a/tempest/tests/compute/servers/test_server_metadata.py
+++ b/tempest/tests/compute/servers/test_server_metadata.py
@@ -44,6 +44,7 @@
         super(ServerMetadataTest, cls).tearDownClass()
 
     def setUp(self):
+        super(ServerMetadataTest, self).setUp()
         meta = {'key1': 'value1', 'key2': 'value2'}
         resp, _ = self.client.set_server_metadata(self.server_id, meta)
         self.assertEqual(resp.status, 200)
diff --git a/tempest/tests/compute/servers/test_servers.py b/tempest/tests/compute/servers/test_servers.py
index 8054c1f..e0d4d44 100644
--- a/tempest/tests/compute/servers/test_servers.py
+++ b/tempest/tests/compute/servers/test_servers.py
@@ -168,7 +168,6 @@
         # deletes are running slow we could very well overrun system
         # memory
         self.clear_servers()
-
         super(ServersTestJSON, self).tearDown()
 
 
@@ -184,5 +183,4 @@
         # deletes are running slow we could very well overrun system
         # memory
         self.clear_servers()
-
         super(ServersTestXML, self).tearDown()
diff --git a/tempest/tests/compute/servers/test_servers_negative.py b/tempest/tests/compute/servers/test_servers_negative.py
index f7624b3..ea63360 100644
--- a/tempest/tests/compute/servers/test_servers_negative.py
+++ b/tempest/tests/compute/servers/test_servers_negative.py
@@ -17,9 +17,8 @@
 
 import sys
 
-import nose
 from nose.plugins.attrib import attr
-import unittest2 as unittest
+import testtools
 
 from tempest import clients
 from tempest.common.utils.data_utils import rand_name
@@ -31,7 +30,7 @@
 
     @classmethod
     def setUpClass(cls):
-        raise nose.SkipTest("Until Bug 1046870 is fixed")
+        raise cls.skipException("Until Bug 1046870 is fixed")
         super(ServersNegativeTest, cls).setUpClass()
         cls.client = cls.servers_client
         cls.img_client = cls.images_client
diff --git a/tempest/tests/compute/servers/test_servers_whitebox.py b/tempest/tests/compute/servers/test_servers_whitebox.py
index 33519b0..502f16b 100644
--- a/tempest/tests/compute/servers/test_servers_whitebox.py
+++ b/tempest/tests/compute/servers/test_servers_whitebox.py
@@ -15,7 +15,6 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import nose
 from nose.plugins.attrib import attr
 
 from tempest import exceptions
@@ -28,7 +27,7 @@
 
     @classmethod
     def setUpClass(cls):
-        raise nose.SkipTest("Until Bug 1034129 is fixed")
+        raise cls.skipException("Until Bug 1034129 is fixed")
         super(ServersWhiteboxTest, cls).setUpClass()
         BaseIdentityAdminTest.setUpClass()
         cls.client = cls.servers_client
diff --git a/tempest/tests/compute/test_authorization.py b/tempest/tests/compute/test_authorization.py
index 78661d1..4d3b553 100644
--- a/tempest/tests/compute/test_authorization.py
+++ b/tempest/tests/compute/test_authorization.py
@@ -16,9 +16,8 @@
 #    under the License.
 
 from nose.plugins.attrib import attr
-from nose import SkipTest
 from nose.tools import raises
-import unittest2 as unittest
+import testtools
 
 from tempest import clients
 from tempest.common.utils.data_utils import parse_image_id
@@ -34,7 +33,7 @@
     def setUpClass(cls):
         if not compute.MULTI_USER:
             msg = "Need >1 user"
-            raise SkipTest(msg)
+            raise cls.skipException(msg)
 
         super(AuthorizationTest, cls).setUpClass()
 
@@ -225,7 +224,7 @@
 
     @raises(exceptions.NotFound)
     @attr(type='negative')
-    @unittest.skip("Skipped until the Bug #1086980 is resolved")
+    @testtools.skip("Skipped until the Bug #1086980 is resolved")
     def test_delete_keypair_of_alt_account_fails(self):
         # A DELETE request for another user's keypair should fail
         self.alt_keypairs_client.delete_keypair(self.keypairname)
diff --git a/tempest/tests/compute/test_live_block_migration.py b/tempest/tests/compute/test_live_block_migration.py
index eceaaba..1b651ab 100644
--- a/tempest/tests/compute/test_live_block_migration.py
+++ b/tempest/tests/compute/test_live_block_migration.py
@@ -18,9 +18,8 @@
 import random
 import string
 
-import nose
 from nose.plugins.attrib import attr
-import unittest2 as unittest
+import testtools
 
 from tempest.common.utils.linux.remote_client import RemoteClient
 from tempest import config
@@ -101,12 +100,12 @@
             return server_id
 
     @attr(type='positive')
-    @unittest.skipIf(not live_migration_available,
-                     'Block Live migration not available')
+    @testtools.skipIf(not live_migration_available,
+                      'Block Live migration not available')
     def test_001_live_block_migration(self):
         # Live block migrate an instance to another host
         if len(self._get_compute_hostnames()) < 2:
-            raise nose.SkipTest(
+            raise self.skipTest(
                 "Less than 2 compute nodes, skipping migration test.")
         server_id = self._get_an_active_server()
         actual_host = self._get_host_for_server(server_id)
@@ -116,9 +115,9 @@
         self.assertEquals(target_host, self._get_host_for_server(server_id))
 
     @attr(type='positive', bug='lp1051881')
-    @unittest.skip('Until bug 1051881 is dealt with.')
-    @unittest.skipIf(not live_migration_available,
-                     'Block Live migration not available')
+    @testtools.skip('Until bug 1051881 is dealt with.')
+    @testtools.skipIf(not live_migration_available,
+                      'Block Live migration not available')
     def test_002_invalid_host_for_migration(self):
         # Migrating to an invalid host should not change the status
 
diff --git a/tempest/tests/compute/volumes/test_attach_volume.py b/tempest/tests/compute/volumes/test_attach_volume.py
index 9581026..0e0e4a5 100644
--- a/tempest/tests/compute/volumes/test_attach_volume.py
+++ b/tempest/tests/compute/volumes/test_attach_volume.py
@@ -16,7 +16,7 @@
 #    under the License.
 
 from nose.plugins.attrib import attr
-import unittest2 as unittest
+import testtools
 
 from tempest import clients
 from tempest.common.utils.data_utils import rand_name
@@ -68,7 +68,7 @@
         return server, volume
 
     @attr(type='positive')
-    @unittest.skipIf(not run_ssh, 'SSH required for this test')
+    @testtools.skipIf(not run_ssh, 'SSH required for this test')
     def test_attach_detach_volume(self):
         # Stop and Start a server with an attached volume, ensuring that
         # the volume remains attached.
diff --git a/tempest/tests/compute/volumes/test_volumes_list.py b/tempest/tests/compute/volumes/test_volumes_list.py
index fef9c8d..cc690a5 100644
--- a/tempest/tests/compute/volumes/test_volumes_list.py
+++ b/tempest/tests/compute/volumes/test_volumes_list.py
@@ -15,7 +15,6 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import nose
 
 from tempest.common.utils.data_utils import rand_name
 from tempest.tests.compute import base
@@ -96,7 +95,7 @@
                            "test. This typically means that the backing file "
                            "size of the nova-volumes group is too small to "
                            "create the 3 volumes needed by this test case")
-                    raise nose.SkipTest(msg)
+                    raise cls.skipException(msg)
                 raise
 
     @classmethod
@@ -142,7 +141,7 @@
                            "test. This typically means that the backing file "
                            "size of the nova-volumes group is too small to "
                            "create the 3 volumes needed by this test case")
-                    raise nose.SkipTest(msg)
+                    raise cls.skipException(msg)
                 raise
 
     @classmethod