diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-06-01 09:38:28 +0100 |
---|---|---|
committer | Emma Foley <emma.l.foley@intel.com> | 2018-06-21 12:17:31 +0000 |
commit | 5506dbf8d9163318f8028b7fabca416a3b7a2438 (patch) | |
tree | 4384e235c119cac2fb2feb8cea3e4625428f6e3d | |
parent | 578049f6e4441d623b4345489204ad781465227e (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>
(cherry picked from commit 619bed631f064a94ab20ac296802d467ebe32318)
-rw-r--r-- | yardstick/tests/unit/benchmark/contexts/test_heat.py | 11 |
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 625f97bf4..8febfc9de 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: |