aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark/contexts
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-06-01 09:38:28 +0100
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-06-01 09:41:04 +0100
commit619bed631f064a94ab20ac296802d467ebe32318 (patch)
tree3a5e88a35682729a724263ce7e62d07ce1af861b /yardstick/tests/unit/benchmark/contexts
parent5e4d95ba299ce92588701d9481657c343b8ef609 (diff)
Remove __init__ method overriding in HeatContextTestCase
Unit test case clases should implement setUp() method instead of overriding __init__() method. JIRA: YARDSTICK-1210 Change-Id: I0f9a10575f9aeebf76dfa84619e59589b3ea83f6 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'yardstick/tests/unit/benchmark/contexts')
-rw-r--r--yardstick/tests/unit/benchmark/contexts/test_heat.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/yardstick/tests/unit/benchmark/contexts/test_heat.py b/yardstick/tests/unit/benchmark/contexts/test_heat.py
index ebb1d69ba..947e6fe22 100644
--- a/yardstick/tests/unit/benchmark/contexts/test_heat.py
+++ b/yardstick/tests/unit/benchmark/contexts/test_heat.py
@@ -13,29 +13,26 @@ import logging
import os
import mock
-import unittest
+from yardstick import ssh
from yardstick.benchmark.contexts import base
from yardstick.benchmark.contexts import heat
from yardstick.benchmark.contexts import model
from yardstick.common import constants as consts
from yardstick.common import exceptions as y_exc
-from yardstick import ssh
+from yardstick.tests.unit import base as ut_base
LOG = logging.getLogger(__name__)
-class HeatContextTestCase(unittest.TestCase):
-
- def __init__(self, *args, **kwargs):
- super(HeatContextTestCase, self).__init__(*args, **kwargs)
- self.name_iter = ('vnf{:03}'.format(x) for x in count(0, step=3))
+class HeatContextTestCase(ut_base.BaseUnitTestCase):
def setUp(self):
self.test_context = heat.HeatContext()
self.addCleanup(self._remove_contexts)
self.mock_context = mock.Mock(spec=heat.HeatContext())
+ self.name_iter = ('vnf{:03}'.format(x) for x in count(0, step=3))
def _remove_contexts(self):
if self.test_context in self.test_context.list: