replace setup method with setUpClass 2
Change-Id: I4b692cb47c5bcc9f1aa656c39a1e1409719f637a
This commit is contained in:
parent
9a77a2255a
commit
e29d4f30e2
@ -67,7 +67,6 @@ class StaticPhysicalSynchronizer(SynchronizerBase):
|
||||
return static_entities
|
||||
|
||||
def _get_changes_entities(self):
|
||||
entities_updates = []
|
||||
|
||||
entities_updates = []
|
||||
files = file_utils.load_files(
|
||||
|
@ -37,12 +37,11 @@ LOG = logging.getLogger(__name__)
|
||||
class NagiosTransformerTest(base.BaseTest):
|
||||
|
||||
# noinspection PyAttributeOutsideInit
|
||||
def setUp(self):
|
||||
super(NagiosTransformerTest, self).setUp()
|
||||
|
||||
self.transformers = {}
|
||||
host_transformer = HostTransformer(self.transformers)
|
||||
self.transformers[NOVA_HOST_PLUGIN] = host_transformer
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.transformers = {}
|
||||
host_transformer = HostTransformer(cls.transformers)
|
||||
cls.transformers[NOVA_HOST_PLUGIN] = host_transformer
|
||||
|
||||
def test_extract_key(self):
|
||||
LOG.debug('Test get key from nova instance transformer')
|
||||
|
@ -37,12 +37,11 @@ LOG = logging.getLogger(__name__)
|
||||
class NovaHostTransformerTest(base.BaseTest):
|
||||
|
||||
# noinspection PyAttributeOutsideInit
|
||||
def setUp(self):
|
||||
super(NovaHostTransformerTest, self).setUp()
|
||||
|
||||
self.transformers = {}
|
||||
zone_transformer = ZoneTransformer(self.transformers)
|
||||
self.transformers[NOVA_ZONE_PLUGIN] = zone_transformer
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.transformers = {}
|
||||
zone_transformer = ZoneTransformer(cls.transformers)
|
||||
cls.transformers[NOVA_ZONE_PLUGIN] = zone_transformer
|
||||
|
||||
def test_create_placeholder_vertex(self):
|
||||
LOG.debug('Nova host transformer test: Test create placeholder vertex')
|
||||
|
@ -38,12 +38,11 @@ LOG = logging.getLogger(__name__)
|
||||
class NovaInstanceTransformerTest(base.BaseTest):
|
||||
|
||||
# noinspection PyAttributeOutsideInit
|
||||
def setUp(self):
|
||||
super(NovaInstanceTransformerTest, self).setUp()
|
||||
|
||||
self.transformers = {}
|
||||
host_transformer = HostTransformer(self.transformers)
|
||||
self.transformers[NOVA_HOST_PLUGIN] = host_transformer
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.transformers = {}
|
||||
host_transformer = HostTransformer(cls.transformers)
|
||||
cls.transformers[NOVA_HOST_PLUGIN] = host_transformer
|
||||
|
||||
def test_create_placeholder_vertex(self):
|
||||
LOG.debug('Test create placeholder vertex')
|
||||
|
@ -36,12 +36,12 @@ LOG = logging.getLogger(__name__)
|
||||
class NovaZoneTransformerTest(base.BaseTest):
|
||||
|
||||
# noinspection PyAttributeOutsideInit
|
||||
def setUp(self):
|
||||
super(NovaZoneTransformerTest, self).setUp()
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
||||
self.transformers = {}
|
||||
host_transformer = HostTransformer(self.transformers)
|
||||
self.transformers[NOVA_HOST_PLUGIN] = host_transformer
|
||||
cls.transformers = {}
|
||||
host_transformer = HostTransformer(cls.transformers)
|
||||
cls.transformers[NOVA_HOST_PLUGIN] = host_transformer
|
||||
|
||||
def test_create_placeholder_vertex(self):
|
||||
|
||||
|
@ -70,12 +70,12 @@ class TestStaticPhysicalSynchronizer(base.BaseTest):
|
||||
]
|
||||
|
||||
# noinspection PyAttributeOutsideInit
|
||||
def setUp(self):
|
||||
super(TestStaticPhysicalSynchronizer, self).setUp()
|
||||
self.conf = cfg.ConfigOpts()
|
||||
self.conf.register_opts(self.OPTS, group=STATIC_PHYSICAL_PLUGIN)
|
||||
self.static_physical_synchronizer = \
|
||||
synchronizer.StaticPhysicalSynchronizer(self.conf)
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.conf = cfg.ConfigOpts()
|
||||
cls.conf.register_opts(cls.OPTS, group=STATIC_PHYSICAL_PLUGIN)
|
||||
cls.static_physical_synchronizer = \
|
||||
synchronizer.StaticPhysicalSynchronizer(cls.conf)
|
||||
|
||||
def test_static_plugins_loader(self):
|
||||
# Setup
|
||||
|
@ -35,14 +35,13 @@ LOG = logging.getLogger(__name__)
|
||||
class TestStaticPhysicalTransformer(base.BaseTest):
|
||||
|
||||
# noinspection PyAttributeOutsideInit
|
||||
def setUp(self):
|
||||
super(TestStaticPhysicalTransformer, self).setUp()
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
||||
self.transformers = {}
|
||||
host_transformer = HostTransformer(self.transformers)
|
||||
static_transformer = StaticPhysicalTransformer(self.transformers)
|
||||
self.transformers[NOVA_HOST_PLUGIN] = host_transformer
|
||||
self.transformers[STATIC_PHYSICAL_PLUGIN] = static_transformer
|
||||
cls.transformers = {}
|
||||
cls.transformers[NOVA_HOST_PLUGIN] = HostTransformer(cls.transformers)
|
||||
cls.transformers[STATIC_PHYSICAL_PLUGIN] = StaticPhysicalTransformer(
|
||||
cls.transformers)
|
||||
|
||||
def test_create_placeholder_vertex(self):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user