Make several ec2 API tests inherit from NoDBTestCase
There are several ec2 API test classes which aren't using the database so we should have them inherit from the NoDBTestCase base class. Change-Id: I6c2fcca72c93d6528a40813652c0bb6d6783ee09
This commit is contained in:
@@ -96,7 +96,7 @@ class FakeHttplibConnection(object):
|
||||
pass
|
||||
|
||||
|
||||
class XmlConversionTestCase(test.TestCase):
|
||||
class XmlConversionTestCase(test.NoDBTestCase):
|
||||
"""Unit test api xml conversion."""
|
||||
def test_number_conversion(self):
|
||||
conv = ec2utils._try_convert
|
||||
@@ -127,7 +127,7 @@ class XmlConversionTestCase(test.TestCase):
|
||||
self.assertEqual(conv(''), '')
|
||||
|
||||
|
||||
class Ec2utilsTestCase(test.TestCase):
|
||||
class Ec2utilsTestCase(test.NoDBTestCase):
|
||||
def test_ec2_id_to_id(self):
|
||||
self.assertEqual(ec2utils.ec2_id_to_id('i-0000001e'), 30)
|
||||
self.assertEqual(ec2utils.ec2_id_to_id('ami-1d'), 29)
|
||||
|
||||
@@ -3098,7 +3098,7 @@ class CloudTestCase(test.TestCase):
|
||||
mock_ec2_vol_id_to_uuid.assert_called_once_with(ec2_volume_id)
|
||||
|
||||
|
||||
class CloudTestCaseNeutronProxy(test.TestCase):
|
||||
class CloudTestCaseNeutronProxy(test.NoDBTestCase):
|
||||
def setUp(self):
|
||||
super(CloudTestCaseNeutronProxy, self).setUp()
|
||||
cfg.CONF.set_override('security_group_api', 'neutron')
|
||||
|
||||
@@ -181,7 +181,7 @@ class EC2ValidateTestCase(test.TestCase):
|
||||
volume_id=ec2_id)
|
||||
|
||||
|
||||
class EC2TimestampValidationTestCase(test.TestCase):
|
||||
class EC2TimestampValidationTestCase(test.NoDBTestCase):
|
||||
"""Test case for EC2 request timestamp validation."""
|
||||
|
||||
def test_validate_ec2_timestamp_valid(self):
|
||||
|
||||
Reference in New Issue
Block a user