From 0340b6b588b27add41bb3823740c58a99daaf46b Mon Sep 17 00:00:00 2001 From: Sergey Reshetnyak Date: Wed, 26 Mar 2014 13:53:26 +0400 Subject: [PATCH] Fix running integration tests by tag Closes bug: #1297747 Change-Id: Idd5aed6c88647dfefc2502edb8c30a06576c17e2 --- sahara/tests/integration/tests/base.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sahara/tests/integration/tests/base.py b/sahara/tests/integration/tests/base.py index bc28a25e..6d90c35d 100644 --- a/sahara/tests/integration/tests/base.py +++ b/sahara/tests/integration/tests/base.py @@ -23,6 +23,7 @@ from neutronclient.v2_0 import client as neutron_client from novaclient.v1_1 import client as nova_client import saharaclient.client as sahara_client from swiftclient import client as swift_client +import testtools import unittest2 from sahara.openstack.common import excutils @@ -53,8 +54,10 @@ def skip_test(config_name, message=''): return handle -class ITestCase(unittest2.TestCase): +class ITestCase(testtools.TestCase, testtools.testcase.WithAttributes, + unittest2.TestCase): def setUp(self): + super(ITestCase, self).setUp() self.common_config = cfg.ITConfig().common_config self.vanilla_config = cfg.ITConfig().vanilla_config self.hdp_config = cfg.ITConfig().hdp_config @@ -575,3 +578,5 @@ class ITestCase(unittest2.TestCase): self.nova.keypairs.delete(self.common_config.USER_KEYPAIR_ID) if not self.common_config.FLAVOR_ID: self.nova.flavors.delete(self.flavor_id) + + super(ITestCase, self).tearDown()