Rename test classes for consistency
Change-Id: I42f8664eaca5f025a87212d9455df15db7fce032
This commit is contained in:
parent
39ec8f4772
commit
d0dd65e72f
|
@ -17,7 +17,7 @@ from heat.tests import common
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
|
||||||
|
|
||||||
class CeilometerClientPluginTests(common.HeatTestCase):
|
class CeilometerClientPluginTest(common.HeatTestCase):
|
||||||
|
|
||||||
def test_create(self):
|
def test_create(self):
|
||||||
self.patchobject(cc.HTTPClient, 'client_request')
|
self.patchobject(cc.HTTPClient, 'client_request')
|
||||||
|
|
|
@ -22,11 +22,11 @@ from heat.tests import common
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
|
||||||
|
|
||||||
class CinderClientPluginTests(common.HeatTestCase):
|
class CinderClientPluginTest(common.HeatTestCase):
|
||||||
"""Basic tests for :module:'heat.engine.clients.os.cinder'."""
|
"""Basic tests for :module:'heat.engine.clients.os.cinder'."""
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(CinderClientPluginTests, self).setUp()
|
super(CinderClientPluginTest, self).setUp()
|
||||||
self.cinder_client = mock.MagicMock()
|
self.cinder_client = mock.MagicMock()
|
||||||
con = utils.dummy_context()
|
con = utils.dummy_context()
|
||||||
c = con.clients
|
c = con.clients
|
||||||
|
|
|
@ -22,11 +22,11 @@ from heat.tests import common
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
|
||||||
|
|
||||||
class GlanceUtilsTests(common.HeatTestCase):
|
class GlanceUtilsTest(common.HeatTestCase):
|
||||||
"""Basic tests for :module:'heat.engine.resources.clients.os.glance'."""
|
"""Basic tests for :module:'heat.engine.resources.clients.os.glance'."""
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(GlanceUtilsTests, self).setUp()
|
super(GlanceUtilsTest, self).setUp()
|
||||||
self.glance_client = mock.MagicMock()
|
self.glance_client = mock.MagicMock()
|
||||||
con = utils.dummy_context()
|
con = utils.dummy_context()
|
||||||
c = con.clients
|
c = con.clients
|
||||||
|
|
|
@ -20,7 +20,7 @@ from heat.tests import utils
|
||||||
magnum_client = importutils.try_import('magnumclient.v1.client')
|
magnum_client = importutils.try_import('magnumclient.v1.client')
|
||||||
|
|
||||||
|
|
||||||
class MagnumClientPluginTests(common.HeatTestCase):
|
class MagnumClientPluginTest(common.HeatTestCase):
|
||||||
|
|
||||||
@testtools.skipIf(magnum_client is None, 'Tests the magnum client')
|
@testtools.skipIf(magnum_client is None, 'Tests the magnum client')
|
||||||
def test_create(self):
|
def test_create(self):
|
||||||
|
|
|
@ -20,7 +20,7 @@ from heat.tests import common
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
|
||||||
|
|
||||||
class ManilaClientPluginTests(common.HeatTestCase):
|
class ManilaClientPluginTest(common.HeatTestCase):
|
||||||
scenarios = [
|
scenarios = [
|
||||||
('share_type',
|
('share_type',
|
||||||
dict(manager_name="share_types",
|
dict(manager_name="share_types",
|
||||||
|
@ -37,7 +37,7 @@ class ManilaClientPluginTests(common.HeatTestCase):
|
||||||
]
|
]
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(ManilaClientPluginTests, self).setUp()
|
super(ManilaClientPluginTest, self).setUp()
|
||||||
# mock client and plugin
|
# mock client and plugin
|
||||||
self.manila_client = mock.MagicMock()
|
self.manila_client = mock.MagicMock()
|
||||||
con = utils.dummy_context()
|
con = utils.dummy_context()
|
||||||
|
|
|
@ -15,7 +15,7 @@ from heat.tests import common
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
|
||||||
|
|
||||||
class MistralClientPluginTests(common.HeatTestCase):
|
class MistralClientPluginTest(common.HeatTestCase):
|
||||||
|
|
||||||
def test_create(self):
|
def test_create(self):
|
||||||
context = utils.dummy_context()
|
context = utils.dummy_context()
|
||||||
|
|
|
@ -35,9 +35,9 @@ class NeutronClientPluginTestCase(common.HeatTestCase):
|
||||||
self.neutron_plugin._client = self.neutron_client
|
self.neutron_plugin._client = self.neutron_client
|
||||||
|
|
||||||
|
|
||||||
class NeutronClientPluginTests(NeutronClientPluginTestCase):
|
class NeutronClientPluginTest(NeutronClientPluginTestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(NeutronClientPluginTests, self).setUp()
|
super(NeutronClientPluginTest, self).setUp()
|
||||||
self.mock_find = self.patchobject(neutron.neutronV20,
|
self.mock_find = self.patchobject(neutron.neutronV20,
|
||||||
'find_resourceid_by_name_or_id')
|
'find_resourceid_by_name_or_id')
|
||||||
self.mock_find.return_value = 42
|
self.mock_find.return_value = 42
|
||||||
|
@ -258,7 +258,7 @@ class NeutronProviderConstraintsValidate(common.HeatTestCase):
|
||||||
self.assertFalse(constraint.validate("bar", ctx))
|
self.assertFalse(constraint.validate("bar", ctx))
|
||||||
|
|
||||||
|
|
||||||
class NeutronClientPluginExtensionsTests(NeutronClientPluginTestCase):
|
class NeutronClientPluginExtensionsTest(NeutronClientPluginTestCase):
|
||||||
"""Tests for extensions in neutronclient."""
|
"""Tests for extensions in neutronclient."""
|
||||||
|
|
||||||
def test_has_no_extension(self):
|
def test_has_no_extension(self):
|
||||||
|
|
|
@ -41,7 +41,7 @@ class NovaClientPluginTestCase(common.HeatTestCase):
|
||||||
self.nova_plugin._client = self.nova_client
|
self.nova_plugin._client = self.nova_client
|
||||||
|
|
||||||
|
|
||||||
class NovaClientPluginTests(NovaClientPluginTestCase):
|
class NovaClientPluginTest(NovaClientPluginTestCase):
|
||||||
"""Basic tests for :module:'heat.engine.clients.os.nova'."""
|
"""Basic tests for :module:'heat.engine.clients.os.nova'."""
|
||||||
|
|
||||||
def test_create(self):
|
def test_create(self):
|
||||||
|
@ -255,7 +255,7 @@ class NovaClientPluginTests(NovaClientPluginTestCase):
|
||||||
self.nova_plugin.absolute_limits)
|
self.nova_plugin.absolute_limits)
|
||||||
|
|
||||||
|
|
||||||
class NovaClientPluginRefreshServerTests(NovaClientPluginTestCase):
|
class NovaClientPluginRefreshServerTest(NovaClientPluginTestCase):
|
||||||
msg = ("ClientException: The server has either erred or is "
|
msg = ("ClientException: The server has either erred or is "
|
||||||
"incapable of performing the requested operation.")
|
"incapable of performing the requested operation.")
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ class NovaClientPluginRefreshServerTests(NovaClientPluginTestCase):
|
||||||
server.get.assert_called_once_with()
|
server.get.assert_called_once_with()
|
||||||
|
|
||||||
|
|
||||||
class NovaClientPluginFetchServerTests(NovaClientPluginTestCase):
|
class NovaClientPluginFetchServerTest(NovaClientPluginTestCase):
|
||||||
|
|
||||||
server = mock.Mock()
|
server = mock.Mock()
|
||||||
# set explicitly as id and name has internal meaning in mock.Mock
|
# set explicitly as id and name has internal meaning in mock.Mock
|
||||||
|
@ -328,7 +328,7 @@ class NovaClientPluginFetchServerTests(NovaClientPluginTestCase):
|
||||||
self.nova_client.servers.get.assert_called_once_with(self.server.id)
|
self.nova_client.servers.get.assert_called_once_with(self.server.id)
|
||||||
|
|
||||||
|
|
||||||
class NovaClientPluginCheckActiveTests(NovaClientPluginTestCase):
|
class NovaClientPluginCheckActiveTest(NovaClientPluginTestCase):
|
||||||
|
|
||||||
scenarios = [
|
scenarios = [
|
||||||
('active', dict(
|
('active', dict(
|
||||||
|
@ -346,7 +346,7 @@ class NovaClientPluginCheckActiveTests(NovaClientPluginTestCase):
|
||||||
]
|
]
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(NovaClientPluginCheckActiveTests, self).setUp()
|
super(NovaClientPluginCheckActiveTest, self).setUp()
|
||||||
self.server = mock.Mock()
|
self.server = mock.Mock()
|
||||||
self.server.id = '1234'
|
self.server.id = '1234'
|
||||||
self.server.status = self.status
|
self.server.status = self.status
|
||||||
|
@ -387,7 +387,7 @@ class NovaClientPluginCheckActiveTests(NovaClientPluginTestCase):
|
||||||
self.assertEqual(0, self.r_mock.call_count)
|
self.assertEqual(0, self.r_mock.call_count)
|
||||||
|
|
||||||
|
|
||||||
class NovaClientPluginUserdataTests(NovaClientPluginTestCase):
|
class NovaClientPluginUserdataTest(NovaClientPluginTestCase):
|
||||||
|
|
||||||
def test_build_userdata(self):
|
def test_build_userdata(self):
|
||||||
"""Tests the build_userdata function."""
|
"""Tests the build_userdata function."""
|
||||||
|
@ -432,7 +432,7 @@ class NovaClientPluginUserdataTests(NovaClientPluginTestCase):
|
||||||
self.assertIn('ec2-user', data)
|
self.assertIn('ec2-user', data)
|
||||||
|
|
||||||
|
|
||||||
class NovaClientPluginMetadataTests(NovaClientPluginTestCase):
|
class NovaClientPluginMetadataTest(NovaClientPluginTestCase):
|
||||||
|
|
||||||
def test_serialize_string(self):
|
def test_serialize_string(self):
|
||||||
original = {'test_key': 'simple string value'}
|
original = {'test_key': 'simple string value'}
|
||||||
|
@ -677,7 +677,7 @@ class ConsoleUrlsTest(common.HeatTestCase):
|
||||||
self.console_method.assert_called_once_with(self.console_type)
|
self.console_method.assert_called_once_with(self.console_type)
|
||||||
|
|
||||||
|
|
||||||
class NovaClientPluginExtensionsTests(NovaClientPluginTestCase):
|
class NovaClientPluginExtensionsTest(NovaClientPluginTestCase):
|
||||||
"""Tests for extensions in novaclient."""
|
"""Tests for extensions in novaclient."""
|
||||||
|
|
||||||
def test_has_no_extensions(self):
|
def test_has_no_extensions(self):
|
||||||
|
|
|
@ -15,10 +15,10 @@ from heat.engine.clients import progress
|
||||||
from heat.tests import common
|
from heat.tests import common
|
||||||
|
|
||||||
|
|
||||||
class ServerUpdateProgressObjectTests(common.HeatTestCase):
|
class ServerUpdateProgressObjectTest(common.HeatTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(ServerUpdateProgressObjectTests, self).setUp()
|
super(ServerUpdateProgressObjectTest, self).setUp()
|
||||||
self.server_id = '1234'
|
self.server_id = '1234'
|
||||||
self.handler = 'test'
|
self.handler = 'test'
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,11 @@ from heat.tests import common
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
|
||||||
|
|
||||||
class SaharaUtilsTests(common.HeatTestCase):
|
class SaharaUtilsTest(common.HeatTestCase):
|
||||||
"""Basic tests :module:'heat.engine.resources.clients.os.sahara'."""
|
"""Basic tests :module:'heat.engine.resources.clients.os.sahara'."""
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(SaharaUtilsTests, self).setUp()
|
super(SaharaUtilsTest, self).setUp()
|
||||||
self.sahara_client = mock.MagicMock()
|
self.sahara_client = mock.MagicMock()
|
||||||
con = utils.dummy_context()
|
con = utils.dummy_context()
|
||||||
c = con.clients
|
c = con.clients
|
||||||
|
|
|
@ -19,7 +19,7 @@ from heat.tests import utils
|
||||||
from senlinclient.common import exc
|
from senlinclient.common import exc
|
||||||
|
|
||||||
|
|
||||||
class SenlinClientPluginTests(common.HeatTestCase):
|
class SenlinClientPluginTest(common.HeatTestCase):
|
||||||
|
|
||||||
def test_cluster_get(self):
|
def test_cluster_get(self):
|
||||||
context = utils.dummy_context()
|
context = utils.dummy_context()
|
||||||
|
|
|
@ -33,7 +33,7 @@ class SwiftClientPluginTestCase(common.HeatTestCase):
|
||||||
self.swift_plugin._client = self.swift_client
|
self.swift_plugin._client = self.swift_client
|
||||||
|
|
||||||
|
|
||||||
class SwiftUtilsTests(SwiftClientPluginTestCase):
|
class SwiftUtilsTest(SwiftClientPluginTestCase):
|
||||||
|
|
||||||
def test_is_valid_temp_url_path(self):
|
def test_is_valid_temp_url_path(self):
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ from heat.tests import common
|
||||||
from heat.tests import utils
|
from heat.tests import utils
|
||||||
|
|
||||||
|
|
||||||
class ZaqarClientPluginTests(common.HeatTestCase):
|
class ZaqarClientPluginTest(common.HeatTestCase):
|
||||||
|
|
||||||
def test_create(self):
|
def test_create(self):
|
||||||
context = utils.dummy_context()
|
context = utils.dummy_context()
|
||||||
|
|
|
@ -40,10 +40,10 @@ TEMPLATE = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class ResourceChainTests(common.HeatTestCase):
|
class ResourceChainTest(common.HeatTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(ResourceChainTests, self).setUp()
|
super(ResourceChainTest, self).setUp()
|
||||||
|
|
||||||
self.stack = None # hold on to stack to prevent weakref cleanup
|
self.stack = None # hold on to stack to prevent weakref cleanup
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ from heat.common import exception
|
||||||
from heat.tests import common
|
from heat.tests import common
|
||||||
|
|
||||||
|
|
||||||
class CryptTests(common.HeatTestCase):
|
class CryptTest(common.HeatTestCase):
|
||||||
|
|
||||||
def test_fernet_key(self):
|
def test_fernet_key(self):
|
||||||
key = 'x' * 16
|
key = 'x' * 16
|
||||||
|
|
|
@ -26,7 +26,7 @@ resources:
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
class LifecyclePluginUtilsTests(common.HeatTestCase):
|
class LifecyclePluginUtilsTest(common.HeatTestCase):
|
||||||
"""Basic tests for :module:'heat.common.lifecycle_plugin_utils'.
|
"""Basic tests for :module:'heat.common.lifecycle_plugin_utils'.
|
||||||
|
|
||||||
Basic tests for the helper methods in
|
Basic tests for the helper methods in
|
||||||
|
@ -34,10 +34,10 @@ class LifecyclePluginUtilsTests(common.HeatTestCase):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(LifecyclePluginUtilsTests, self).setUp()
|
super(LifecyclePluginUtilsTest, self).setUp()
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
super(LifecyclePluginUtilsTests, self).tearDown()
|
super(LifecyclePluginUtilsTest, self).tearDown()
|
||||||
lifecycle_plugin_utils.pp_class_instances = None
|
lifecycle_plugin_utils.pp_class_instances = None
|
||||||
|
|
||||||
def mock_lcp_class_map(self, lcp_mappings):
|
def mock_lcp_class_map(self, lcp_mappings):
|
||||||
|
|
|
@ -142,7 +142,7 @@ resources:
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
class MetadataRefreshTests(common.HeatTestCase):
|
class MetadataRefreshTest(common.HeatTestCase):
|
||||||
|
|
||||||
@mock.patch.object(instance.Instance, 'handle_create')
|
@mock.patch.object(instance.Instance, 'handle_create')
|
||||||
@mock.patch.object(instance.Instance, 'check_create_complete')
|
@mock.patch.object(instance.Instance, 'check_create_complete')
|
||||||
|
@ -201,10 +201,10 @@ class MetadataRefreshTests(common.HeatTestCase):
|
||||||
return tmp['/tmp/random_file']['content']
|
return tmp['/tmp/random_file']['content']
|
||||||
|
|
||||||
|
|
||||||
class WaitConditionMetadataUpdateTests(common.HeatTestCase):
|
class WaitConditionMetadataUpdateTest(common.HeatTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(WaitConditionMetadataUpdateTests, self).setUp()
|
super(WaitConditionMetadataUpdateTest, self).setUp()
|
||||||
self.man = service.EngineService('a-host', 'a-topic')
|
self.man = service.EngineService('a-host', 'a-topic')
|
||||||
self.man.create_periodic_tasks()
|
self.man.create_periodic_tasks()
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ class WaitConditionMetadataUpdateTests(common.HeatTestCase):
|
||||||
self.assertEqual(2, mock_check.call_count)
|
self.assertEqual(2, mock_check.call_count)
|
||||||
|
|
||||||
|
|
||||||
class MetadataRefreshServerTests(common.HeatTestCase):
|
class MetadataRefreshServerTest(common.HeatTestCase):
|
||||||
|
|
||||||
@mock.patch.object(Server, 'handle_create')
|
@mock.patch.object(Server, 'handle_create')
|
||||||
@mock.patch.object(Server, 'check_create_complete')
|
@mock.patch.object(Server, 'check_create_complete')
|
||||||
|
|
Loading…
Reference in New Issue