diff --git a/nova/tests/cells/test_cells_filters.py b/nova/tests/cells/test_cells_filters.py index 44b4fdf45a3e..0ba10c224e6f 100644 --- a/nova/tests/cells/test_cells_filters.py +++ b/nova/tests/cells/test_cells_filters.py @@ -23,7 +23,7 @@ from nova import test from nova.tests.cells import fakes -class FiltersTestCase(test.TestCase): +class FiltersTestCase(test.NoDBTestCase): """Makes sure the proper filters are in the directory.""" def test_all_filters(self): @@ -32,7 +32,7 @@ class FiltersTestCase(test.TestCase): self.assertIn("TargetCellFilter", class_names) -class _FilterTestClass(test.TestCase): +class _FilterTestClass(test.NoDBTestCase): """Base class for testing individual filter plugins.""" filter_cls_name = None diff --git a/nova/tests/cells/test_cells_manager.py b/nova/tests/cells/test_cells_manager.py index 0db96eb9532f..719684aecce8 100644 --- a/nova/tests/cells/test_cells_manager.py +++ b/nova/tests/cells/test_cells_manager.py @@ -43,7 +43,7 @@ FAKE_TASK_LOGS = [dict(id=1, host='host1'), dict(id=2, host='host2')] -class CellsManagerClassTestCase(test.TestCase): +class CellsManagerClassTestCase(test.NoDBTestCase): """Test case for CellsManager class.""" def setUp(self): diff --git a/nova/tests/cells/test_cells_rpc_driver.py b/nova/tests/cells/test_cells_rpc_driver.py index 91d4784800a8..cf8fd1550c07 100644 --- a/nova/tests/cells/test_cells_rpc_driver.py +++ b/nova/tests/cells/test_cells_rpc_driver.py @@ -33,7 +33,7 @@ CONF.import_opt('rpc_driver_queue_base', 'nova.cells.rpc_driver', group='cells') -class CellsRPCDriverTestCase(test.TestCase): +class CellsRPCDriverTestCase(test.NoDBTestCase): """Test case for Cells communication via RPC.""" def setUp(self): @@ -221,7 +221,7 @@ class CellsRPCDriverTestCase(test.TestCase): self.assertTrue(call_info['process_called']) -class ParseTransportURLTestCase(test.TestCase): +class ParseTransportURLTestCase(test.NoDBTestCase): def test_bad_scheme(self): url = "bad:///" self.assertRaises(ValueError, rpc_driver.parse_transport_url, url) @@ -332,7 +332,7 @@ class ParseTransportURLTestCase(test.TestCase): self.assertRaises(ValueError, rpc_driver.parse_transport_url, url) -class UnparseTransportURLTestCase(test.TestCase): +class UnparseTransportURLTestCase(test.NoDBTestCase): def test_empty(self): result = rpc_driver.unparse_transport_url({}) diff --git a/nova/tests/cells/test_cells_rpcapi.py b/nova/tests/cells/test_cells_rpcapi.py index 5823e3ef34c8..0d6076c6fbf3 100644 --- a/nova/tests/cells/test_cells_rpcapi.py +++ b/nova/tests/cells/test_cells_rpcapi.py @@ -27,7 +27,7 @@ CONF = cfg.CONF CONF.import_opt('topic', 'nova.cells.opts', group='cells') -class CellsAPITestCase(test.TestCase): +class CellsAPITestCase(test.NoDBTestCase): """Test case for cells.api interfaces.""" def setUp(self): diff --git a/nova/tests/cells/test_cells_utils.py b/nova/tests/cells/test_cells_utils.py index 49165bfcd60d..44141150b6b8 100644 --- a/nova/tests/cells/test_cells_utils.py +++ b/nova/tests/cells/test_cells_utils.py @@ -23,7 +23,7 @@ from nova import db from nova import test -class CellsUtilsTestCase(test.TestCase): +class CellsUtilsTestCase(test.NoDBTestCase): """Test case for Cells utility methods.""" def test_get_instances_to_sync(self): fake_context = 'fake_context' diff --git a/nova/tests/cells/test_cells_weights.py b/nova/tests/cells/test_cells_weights.py index 38618bc64322..ff808b940237 100644 --- a/nova/tests/cells/test_cells_weights.py +++ b/nova/tests/cells/test_cells_weights.py @@ -58,7 +58,7 @@ def _get_fake_cells(): return [cell1, cell2, cell3, cell4] -class CellsWeightsTestCase(test.TestCase): +class CellsWeightsTestCase(test.NoDBTestCase): """Makes sure the proper weighers are in the directory.""" def test_all_weighers(self): @@ -70,7 +70,7 @@ class CellsWeightsTestCase(test.TestCase): self.assert_('RamByInstanceTypeWeigher', class_names) -class _WeigherTestClass(test.TestCase): +class _WeigherTestClass(test.NoDBTestCase): """Base class for testing individual weigher plugins.""" weigher_cls_name = None diff --git a/nova/tests/cert/test_rpcapi.py b/nova/tests/cert/test_rpcapi.py index bacbfc194a10..def15af0890e 100644 --- a/nova/tests/cert/test_rpcapi.py +++ b/nova/tests/cert/test_rpcapi.py @@ -28,7 +28,7 @@ from nova import test CONF = cfg.CONF -class CertRpcAPITestCase(test.TestCase): +class CertRpcAPITestCase(test.NoDBTestCase): def _test_cert_api(self, method, **kwargs): ctxt = context.RequestContext('fake_user', 'fake_project') rpcapi = cert_rpcapi.CertAPI() diff --git a/nova/tests/compute/test_claims.py b/nova/tests/compute/test_claims.py index aa1be2107e57..e94983598523 100644 --- a/nova/tests/compute/test_claims.py +++ b/nova/tests/compute/test_claims.py @@ -40,7 +40,7 @@ class DummyTracker(object): self.pci_tracker = pci_manager.PciDevTracker() -class ClaimTestCase(test.TestCase): +class ClaimTestCase(test.NoDBTestCase): def setUp(self): super(ClaimTestCase, self).setUp() diff --git a/nova/tests/compute/test_stats.py b/nova/tests/compute/test_stats.py index 4bb9a452d48b..6060db93515b 100644 --- a/nova/tests/compute/test_stats.py +++ b/nova/tests/compute/test_stats.py @@ -23,7 +23,7 @@ from nova.compute import vm_states from nova import test -class StatsTestCase(test.TestCase): +class StatsTestCase(test.NoDBTestCase): def setUp(self): super(StatsTestCase, self).setUp() self.stats = stats.Stats() diff --git a/nova/tests/compute/test_virtapi.py b/nova/tests/compute/test_virtapi.py index 04b8c5f3120c..9bf5175f0641 100644 --- a/nova/tests/compute/test_virtapi.py +++ b/nova/tests/compute/test_virtapi.py @@ -24,7 +24,7 @@ from nova.virt import fake from nova.virt import virtapi -class VirtAPIBaseTest(test.TestCase, test.APICoverage): +class VirtAPIBaseTest(test.NoDBTestCase, test.APICoverage): cover_api = virtapi.VirtAPI diff --git a/nova/tests/compute/test_vmmode.py b/nova/tests/compute/test_vmmode.py index 374f040ed77d..0d10807ecf76 100644 --- a/nova/tests/compute/test_vmmode.py +++ b/nova/tests/compute/test_vmmode.py @@ -20,7 +20,7 @@ from nova import test from nova.compute import vm_mode -class ComputeVMModeTest(test.TestCase): +class ComputeVMModeTest(test.NoDBTestCase): def test_case(self): inst = dict(vm_mode="HVM") diff --git a/nova/tests/console/test_rpcapi.py b/nova/tests/console/test_rpcapi.py index 691e0ef8d61c..631debece349 100644 --- a/nova/tests/console/test_rpcapi.py +++ b/nova/tests/console/test_rpcapi.py @@ -28,7 +28,7 @@ from nova import test CONF = cfg.CONF -class ConsoleRpcAPITestCase(test.TestCase): +class ConsoleRpcAPITestCase(test.NoDBTestCase): def _test_console_api(self, method, rpc_method, **kwargs): ctxt = context.RequestContext('fake_user', 'fake_project') rpcapi = console_rpcapi.ConsoleAPI() diff --git a/nova/tests/image/test_fake.py b/nova/tests/image/test_fake.py index 266d03fc6848..5d3b7e997ba4 100644 --- a/nova/tests/image/test_fake.py +++ b/nova/tests/image/test_fake.py @@ -24,7 +24,7 @@ from nova import test import nova.tests.image.fake -class FakeImageServiceTestCase(test.TestCase): +class FakeImageServiceTestCase(test.NoDBTestCase): def setUp(self): super(FakeImageServiceTestCase, self).setUp() self.image_service = nova.tests.image.fake.FakeImageService() diff --git a/nova/tests/network/test_network_info.py b/nova/tests/network/test_network_info.py index 5840308c7b0b..4c587ec9bbc6 100644 --- a/nova/tests/network/test_network_info.py +++ b/nova/tests/network/test_network_info.py @@ -23,7 +23,7 @@ from nova.tests import fake_network_cache_model from nova.virt import netutils -class RouteTests(test.TestCase): +class RouteTests(test.NoDBTestCase): def test_create_route_with_attrs(self): route = fake_network_cache_model.new_route() ip = fake_network_cache_model.new_ip(dict(address='192.168.1.1')) @@ -50,7 +50,7 @@ class RouteTests(test.TestCase): self.assertEqual(route['interface'], None) -class FixedIPTests(test.TestCase): +class FixedIPTests(test.NoDBTestCase): def test_createnew_fixed_ip_with_attrs(self): fixed_ip = model.FixedIP(address='192.168.1.100') self.assertEqual(fixed_ip['address'], '192.168.1.100') @@ -99,7 +99,7 @@ class FixedIPTests(test.TestCase): self.assertEqual(fixed_ip['floating_ips'], ['192.168.1.101']) -class SubnetTests(test.TestCase): +class SubnetTests(test.NoDBTestCase): def test_create_subnet_with_attrs(self): subnet = fake_network_cache_model.new_subnet() @@ -199,7 +199,7 @@ class SubnetTests(test.TestCase): self.assertEqual(subnet['version'], 4) -class NetworkTests(test.TestCase): +class NetworkTests(test.NoDBTestCase): def test_create_network(self): network = fake_network_cache_model.new_network() self.assertEqual(network['id'], 1) @@ -250,7 +250,7 @@ class NetworkTests(test.TestCase): dict(cidr='255.255.255.255'))]) -class VIFTests(test.TestCase): +class VIFTests(test.NoDBTestCase): def test_create_vif(self): vif = fake_network_cache_model.new_vif() self.assertEqual(vif['id'], 1) @@ -322,7 +322,7 @@ class VIFTests(test.TestCase): fake_network_cache_model.new_network()) -class NetworkInfoTests(test.TestCase): +class NetworkInfoTests(test.NoDBTestCase): def test_create_model(self): ninfo = model.NetworkInfo([fake_network_cache_model.new_vif(), fake_network_cache_model.new_vif( diff --git a/nova/tests/volume/test_cinder.py b/nova/tests/volume/test_cinder.py index 93fc77578740..fe42fa2c00cd 100644 --- a/nova/tests/volume/test_cinder.py +++ b/nova/tests/volume/test_cinder.py @@ -42,7 +42,7 @@ class FakeCinderClient(object): self.volume_snapshots = self.volumes -class CinderApiTestCase(test.TestCase): +class CinderApiTestCase(test.NoDBTestCase): def setUp(self): super(CinderApiTestCase, self).setUp()