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/boto/test_ec2_instance_run.py b/tempest/tests/boto/test_ec2_instance_run.py
index 6a8778a..1adb5fb 100644
--- a/tempest/tests/boto/test_ec2_instance_run.py
+++ b/tempest/tests/boto/test_ec2_instance_run.py
@@ -20,9 +20,8 @@
from boto.exception import EC2ResponseError
from boto.s3.key import Key
-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
@@ -44,8 +43,8 @@
def setUpClass(cls):
super(InstanceRunTest, cls).setUpClass()
if not tempest.tests.boto.A_I_IMAGES_READY:
- raise nose.SkipTest("".join(("EC2 ", cls.__name__,
- ": requires ami/aki/ari manifest")))
+ raise cls.skipException("".join(("EC2 ", cls.__name__,
+ ": requires ami/aki/ari manifest")))
cls.os = clients.Manager()
cls.s3_client = cls.os.s3_client
cls.ec2_client = cls.os.ec2api_client
@@ -122,7 +121,7 @@
self.cancelResourceCleanUp(rcuk)
@attr(type='smoke')
- @unittest.skip("Skipped until the Bug #1098891 is resolved")
+ @testtools.skip("Skipped until the Bug #1098891 is resolved")
def test_run_terminate_instance(self):
# EC2 run, terminate immediately
image_ami = self.ec2_client.get_image(self.images["ami"]