Don't import HeatTestCase directly

Fix the HeatTestCase import issue as required by H302,
a following patch of https://review.openstack.org/#/c/129846/

Change-Id: Iab9a508682e9fe2932b7d00b191c8a4cdea4738b
changes/30/130130/1
Zhenguo Niu 8 years ago
parent 5622e02a60
commit 09ecdc55a0
  1. 4
      contrib/extraroute/extraroute/tests/test_extraroute.py
  2. 4
      contrib/heat_barbican/heat_barbican/tests/test_order.py
  3. 4
      contrib/heat_barbican/heat_barbican/tests/test_secret.py
  4. 4
      contrib/heat_docker/heat_docker/tests/test_docker_container.py
  5. 4
      contrib/heat_keystoneclient_v2/heat_keystoneclient_v2/tests/test_client.py
  6. 4
      contrib/heat_zaqar/heat_zaqar/tests/test_queue.py
  7. 4
      contrib/nova_flavor/nova_flavor/tests/test_nova_flavor.py
  8. 4
      heat/tests/test_api_aws.py
  9. 4
      heat/tests/test_api_cfn_v1.py
  10. 4
      heat/tests/test_api_cloudwatch.py
  11. 4
      heat/tests/test_api_ec2token.py
  12. 22
      heat/tests/test_api_openstack_v1.py
  13. 6
      heat/tests/test_api_openstack_v1_util.py
  14. 6
      heat/tests/test_api_openstack_v1_views_stacks_view_builder.py
  15. 4
      heat/tests/test_api_openstack_v1_views_views_common.py
  16. 4
      heat/tests/test_auth_password.py
  17. 4
      heat/tests/test_auth_url.py
  18. 4
      heat/tests/test_autoscaling_update_policy.py
  19. 6
      heat/tests/test_ceilometer_alarm.py
  20. 12
      heat/tests/test_clients.py
  21. 4
      heat/tests/test_cloud_config.py
  22. 6
      heat/tests/test_common_context.py
  23. 4
      heat/tests/test_common_param_utils.py
  24. 4
      heat/tests/test_common_policy.py
  25. 6
      heat/tests/test_common_serializers.py
  26. 4
      heat/tests/test_cw_alarm.py
  27. 4
      heat/tests/test_dbinstance.py
  28. 6
      heat/tests/test_eip.py
  29. 10
      heat/tests/test_engine_api_utils.py
  30. 22
      heat/tests/test_engine_service.py
  31. 4
      heat/tests/test_event.py
  32. 4
      heat/tests/test_fault_middleware.py
  33. 12
      heat/tests/test_function.py
  34. 4
      heat/tests/test_glance_client.py
  35. 4
      heat/tests/test_glance_image.py
  36. 4
      heat/tests/test_heatclient.py
  37. 12
      heat/tests/test_hot.py
  38. 4
      heat/tests/test_image.py
  39. 4
      heat/tests/test_instance.py
  40. 4
      heat/tests/test_instance_group_update_policy.py
  41. 4
      heat/tests/test_instance_network.py
  42. 4
      heat/tests/test_iso_8601.py
  43. 4
      heat/tests/test_lifecycle_plugin_utils.py
  44. 4
      heat/tests/test_loadbalancer.py
  45. 4
      heat/tests/test_loguserdata.py
  46. 8
      heat/tests/test_metadata_refresh.py
  47. 4
      heat/tests/test_multi_part.py
  48. 4
      heat/tests/test_nested_stack.py
  49. 4
      heat/tests/test_network_interface.py
  50. 24
      heat/tests/test_neutron.py
  51. 4
      heat/tests/test_neutron_autoscaling.py
  52. 4
      heat/tests/test_neutron_client.py
  53. 8
      heat/tests/test_neutron_firewall.py
  54. 12
      heat/tests/test_neutron_loadbalancer.py
  55. 6
      heat/tests/test_neutron_metering.py
  56. 4
      heat/tests/test_neutron_network_gateway.py
  57. 4
      heat/tests/test_neutron_security_group.py
  58. 10
      heat/tests/test_neutron_vpnservice.py
  59. 4
      heat/tests/test_nokey.py
  60. 4
      heat/tests/test_nova_client.py
  61. 4
      heat/tests/test_nova_floatingip.py
  62. 6
      heat/tests/test_nova_keypair.py
  63. 4
      heat/tests/test_nova_servergroup.py
  64. 10
      heat/tests/test_nova_utils.py
  65. 4
      heat/tests/test_os_database.py
  66. 12
      heat/tests/test_parser.py
  67. 4
      heat/tests/test_plugin_manager.py
  68. 10
      heat/tests/test_provider_template.py
  69. 6
      heat/tests/test_random_string.py
  70. 12
      heat/tests/test_resource.py
  71. 6
      heat/tests/test_rsrc_defn.py
  72. 4
      heat/tests/test_s3.py
  73. 4
      heat/tests/test_sahara_cluster.py
  74. 6
      heat/tests/test_sahara_templates.py
  75. 4
      heat/tests/test_scaling_template.py
  76. 16
      heat/tests/test_scheduler.py
  77. 4
      heat/tests/test_security_group.py
  78. 6
      heat/tests/test_server.py
  79. 4
      heat/tests/test_server_tags.py
  80. 4
      heat/tests/test_signal.py
  81. 6
      heat/tests/test_software_component.py
  82. 4
      heat/tests/test_software_config.py
  83. 8
      heat/tests/test_software_deployment.py
  84. 22
      heat/tests/test_sqlalchemy_api.py
  85. 4
      heat/tests/test_sqlalchemy_filters.py
  86. 4
      heat/tests/test_ssl_middleware.py
  87. 4
      heat/tests/test_stack_lock.py
  88. 4
      heat/tests/test_stack_resource.py
  89. 4
      heat/tests/test_stack_user.py
  90. 12
      heat/tests/test_structured_config.py
  91. 4
      heat/tests/test_support.py
  92. 4
      heat/tests/test_swift.py
  93. 4
      heat/tests/test_swift_client.py
  94. 6
      heat/tests/test_swiftsignal.py
  95. 10
      heat/tests/test_template_format.py
  96. 8
      heat/tests/test_timeutils.py
  97. 4
      heat/tests/test_urlfetch.py
  98. 8
      heat/tests/test_user.py
  99. 4
      heat/tests/test_validate.py
  100. 4
      heat/tests/test_version_negotiation_middleware.py
  101. Some files were not shown because too many files have changed in this diff Show More

@ -16,7 +16,7 @@ from neutronclient.v2_0 import client as neutronclient
from heat.common import template_format
from heat.engine import resource
from heat.engine import scheduler
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
from ..resources import extraroute # noqa
@ -52,7 +52,7 @@ neutron_template = '''
'''
class NeutronExtraRouteTest(HeatTestCase):
class NeutronExtraRouteTest(common.HeatTestCase):
def setUp(self):
super(NeutronExtraRouteTest, self).setUp()
self.m.StubOutWithMock(neutronclient.Client, 'show_router')

@ -19,7 +19,7 @@ from heat.common import template_format
from heat.engine import resource
from heat.engine import rsrc_defn
from heat.engine import scheduler
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
from .. import client # noqa
@ -48,7 +48,7 @@ class FakeOrder(object):
return self.name
class TestOrder(HeatTestCase):
class TestOrder(common.HeatTestCase):
def setUp(self):
super(TestOrder, self).setUp()

@ -19,7 +19,7 @@ from heat.common import template_format
from heat.engine import resource
from heat.engine import rsrc_defn
from heat.engine import scheduler
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
from .. import client # noqa
@ -45,7 +45,7 @@ class FakeSecret(object):
return self.name
class TestSecret(HeatTestCase):
class TestSecret(common.HeatTestCase):
def setUp(self):
super(TestSecret, self).setUp()

@ -21,7 +21,7 @@ from heat.common import exception
from heat.common import template_format
from heat.engine import resource
from heat.engine import scheduler
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
from testtools import skipIf
@ -52,7 +52,7 @@ template = '''
'''
class DockerContainerTest(HeatTestCase):
class DockerContainerTest(common.HeatTestCase):
def setUp(self):
super(DockerContainerTest, self).setUp()

@ -18,13 +18,13 @@ from oslo.config import cfg
from oslo.utils import importutils
from heat.common import exception
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
from .. import client as heat_keystoneclient # noqa
class KeystoneClientTest(HeatTestCase):
class KeystoneClientTest(common.HeatTestCase):
"""Test cases for heat.common.heat_keystoneclient."""
def setUp(self):

@ -19,7 +19,7 @@ from heat.engine import parser
from heat.engine import resource
from heat.engine import scheduler
from heat.engine import template
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
from ..resources import queue # noqa
@ -70,7 +70,7 @@ class FakeQueue(object):
pass
class ZaqarMessageQueueTest(HeatTestCase):
class ZaqarMessageQueueTest(common.HeatTestCase):
def setUp(self):
super(ZaqarMessageQueueTest, self).setUp()
self.fc = self.m.CreateMockAnything()

@ -16,7 +16,7 @@ import mock
from heat.engine import parser
from heat.engine import resource
from heat.engine import template
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
from ..resources.nova_flavor import NovaFlavor # noqa
@ -42,7 +42,7 @@ flavor_template = {
}
class NovaFlavorTest(HeatTestCase):
class NovaFlavorTest(common.HeatTestCase):
def setUp(self):
super(NovaFlavorTest, self).setUp()

@ -13,10 +13,10 @@
from heat.api.aws import utils as api_utils
from heat.tests.common import HeatTestCase
from heat.tests import common
class AWSCommonTest(HeatTestCase):
class AWSCommonTest(common.HeatTestCase):
'''
Tests the api/aws common components
'''

@ -25,13 +25,13 @@ from heat.common import policy
from heat.common.wsgi import Request
from heat.rpc import api as rpc_api
from heat.rpc import client as rpc_client
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
policy_path = os.path.dirname(os.path.realpath(__file__)) + "/policy/"
class CfnStackControllerTest(HeatTestCase):
class CfnStackControllerTest(common.HeatTestCase):
'''
Tests the API class which acts as the WSGI controller,
the endpoint processing API requests after they are routed

@ -21,11 +21,11 @@ from heat.common import policy
from heat.common.wsgi import Request
from heat.rpc import api as engine_api
from heat.rpc import client as rpc_client
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
class WatchControllerTest(HeatTestCase):
class WatchControllerTest(common.HeatTestCase):
'''
Tests the API class which acts as the WSGI controller,
the endpoint processing API requests after they are routed

@ -22,10 +22,10 @@ import requests
from heat.api.aws import ec2token
from heat.api.aws import exception
from heat.common.wsgi import Request
from heat.tests.common import HeatTestCase
from heat.tests import common
class Ec2TokenTest(HeatTestCase):
class Ec2TokenTest(common.HeatTestCase):
'''
Tests the Ec2Token middleware
'''

@ -35,7 +35,7 @@ from heat.common import urlfetch
from heat.common.wsgi import Request
from heat.rpc import api as rpc_api
from heat.rpc import client as rpc_client
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
@ -59,7 +59,7 @@ def to_remote_error(error):
return remote_error
class InstantiationDataTest(HeatTestCase):
class InstantiationDataTest(common.HeatTestCase):
def test_format_parse(self):
data = {"AWSTemplateFormatVersion": "2010-09-09",
@ -313,7 +313,7 @@ class ControllerTest(object):
@mock.patch.object(policy.Enforcer, 'enforce')
class StackControllerTest(ControllerTest, HeatTestCase):
class StackControllerTest(ControllerTest, common.HeatTestCase):
'''
Tests the API class which acts as the WSGI controller,
the endpoint processing API requests after they are routed
@ -1929,7 +1929,7 @@ class StackControllerTest(ControllerTest, HeatTestCase):
self.assertIn('403 Forbidden', six.text_type(resp))
class StackSerializerTest(HeatTestCase):
class StackSerializerTest(common.HeatTestCase):
def setUp(self):
super(StackSerializerTest, self).setUp()
@ -1947,7 +1947,7 @@ class StackSerializerTest(HeatTestCase):
@mock.patch.object(policy.Enforcer, 'enforce')
class ResourceControllerTest(ControllerTest, HeatTestCase):
class ResourceControllerTest(ControllerTest, common.HeatTestCase):
'''
Tests the API class which acts as the WSGI controller,
the endpoint processing API requests after they are routed
@ -2452,7 +2452,7 @@ class ResourceControllerTest(ControllerTest, HeatTestCase):
@mock.patch.object(policy.Enforcer, 'enforce')
class EventControllerTest(ControllerTest, HeatTestCase):
class EventControllerTest(ControllerTest, common.HeatTestCase):
'''
Tests the API class which acts as the WSGI controller,
the endpoint processing API requests after they are routed
@ -3035,7 +3035,7 @@ class EventControllerTest(ControllerTest, HeatTestCase):
self.assertIn('403 Forbidden', six.text_type(resp))
class RoutesTest(HeatTestCase):
class RoutesTest(common.HeatTestCase):
def assertRoute(self, mapper, path, method, action, controller,
params=None):
@ -3496,7 +3496,7 @@ class RoutesTest(HeatTestCase):
@mock.patch.object(policy.Enforcer, 'enforce')
class ActionControllerTest(ControllerTest, HeatTestCase):
class ActionControllerTest(ControllerTest, common.HeatTestCase):
'''
Tests the API class which acts as the WSGI controller,
the endpoint processing API requests after they are routed
@ -3694,7 +3694,7 @@ class ActionControllerTest(ControllerTest, HeatTestCase):
@mock.patch.object(policy.Enforcer, 'enforce')
class BuildInfoControllerTest(ControllerTest, HeatTestCase):
class BuildInfoControllerTest(ControllerTest, common.HeatTestCase):
def setUp(self):
super(BuildInfoControllerTest, self).setUp()
@ -3746,7 +3746,7 @@ class BuildInfoControllerTest(ControllerTest, HeatTestCase):
self.assertIn('403 Forbidden', six.text_type(resp))
class SoftwareConfigControllerTest(ControllerTest, HeatTestCase):
class SoftwareConfigControllerTest(ControllerTest, common.HeatTestCase):
def setUp(self):
super(SoftwareConfigControllerTest, self).setUp()
@ -3870,7 +3870,7 @@ class SoftwareConfigControllerTest(ControllerTest, HeatTestCase):
self.assertEqual('NotFound', resp.json['error']['type'])
class SoftwareDeploymentControllerTest(ControllerTest, HeatTestCase):
class SoftwareDeploymentControllerTest(ControllerTest, common.HeatTestCase):
def setUp(self):
super(SoftwareDeploymentControllerTest, self).setUp()

@ -18,10 +18,10 @@ from heat.api.openstack.v1 import util
from heat.common import context
from heat.common import policy
from heat.common.wsgi import Request
from heat.tests.common import HeatTestCase
from heat.tests import common
class TestGetAllowedParams(HeatTestCase):
class TestGetAllowedParams(common.HeatTestCase):
def setUp(self):
super(TestGetAllowedParams, self).setUp()
req = Request({})
@ -83,7 +83,7 @@ class TestGetAllowedParams(HeatTestCase):
self.assertNotIn('foo', result)
class TestPolicyEnforce(HeatTestCase):
class TestPolicyEnforce(common.HeatTestCase):
def setUp(self):
super(TestPolicyEnforce, self).setUp()
self.req = Request({})

@ -15,10 +15,10 @@ import mock
from heat.api.openstack.v1.views import stacks_view
from heat.common import identifier
from heat.tests.common import HeatTestCase
from heat.tests import common
class TestFormatStack(HeatTestCase):
class TestFormatStack(common.HeatTestCase):
def setUp(self):
super(TestFormatStack, self).setUp()
self.request = mock.Mock()
@ -101,7 +101,7 @@ class TestFormatStack(HeatTestCase):
self.assertNotIn('foo3', result)
class TestStacksViewBuilder(HeatTestCase):
class TestStacksViewBuilder(common.HeatTestCase):
def setUp(self):
super(TestStacksViewBuilder, self).setUp()
self.request = mock.Mock()

@ -15,10 +15,10 @@ import mock
from six.moves.urllib import parse as urlparse
from heat.api.openstack.v1.views import views_common
from heat.tests.common import HeatTestCase
from heat.tests import common
class TestViewsCommon(HeatTestCase):
class TestViewsCommon(common.HeatTestCase):
def setUp(self):
super(TestViewsCommon, self).setUp()
self.request = mock.Mock()

@ -19,7 +19,7 @@ from keystoneclient.v2_0 import client as keystone_client
import webob
from heat.common.auth_password import KeystonePasswordAuthProtocol
from heat.tests.common import HeatTestCase
from heat.tests import common
EXPECTED_V2_DEFAULT_ENV_RESPONSE = {
'HTTP_X_IDENTITY_STATUS': 'Confirmed',
@ -71,7 +71,7 @@ class FakeApp(object):
return resp(env, start_response)
class KeystonePasswordAuthProtocolTest(HeatTestCase):
class KeystonePasswordAuthProtocolTest(common.HeatTestCase):
def setUp(self):
super(KeystonePasswordAuthProtocolTest, self).setUp()

@ -18,7 +18,7 @@ import mock
import webob
from heat.common import auth_url
from heat.tests.common import HeatTestCase
from heat.tests import common
class FakeApp(object):
@ -31,7 +31,7 @@ class FakeApp(object):
return resp(environ, start_response)
class AuthUrlFilterTest(HeatTestCase):
class AuthUrlFilterTest(common.HeatTestCase):
def setUp(self):
super(AuthUrlFilterTest, self).setUp()

@ -28,7 +28,7 @@ from heat.engine import parser
from heat.engine.resources import instance
from heat.engine.resources import loadbalancer as lb
from heat.engine.resources import wait_condition as wc
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
from heat.tests.v1_1 import fakes as fakes11
@ -201,7 +201,7 @@ asg_tmpl_with_updt_policy = '''
'''
class AutoScalingGroupTest(HeatTestCase):
class AutoScalingGroupTest(common.HeatTestCase):
def setUp(self):
super(AutoScalingGroupTest, self).setUp()

@ -28,7 +28,7 @@ from heat.engine import resource
from heat.engine.resources.ceilometer import alarm
from heat.engine import rsrc_defn
from heat.engine import scheduler
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import generic_resource
from heat.tests import utils
@ -125,7 +125,7 @@ class FakeCeilometerClient(object):
alarms = FakeCeilometerAlarms()
class CeilometerAlarmTest(HeatTestCase):
class CeilometerAlarmTest(common.HeatTestCase):
def setUp(self):
super(CeilometerAlarmTest, self).setUp()
@ -412,7 +412,7 @@ class CeilometerAlarmTest(HeatTestCase):
self.m.VerifyAll()
class CombinationAlarmTest(HeatTestCase):
class CombinationAlarmTest(common.HeatTestCase):
def setUp(self):
super(CombinationAlarmTest, self).setUp()

@ -29,12 +29,12 @@ from testtools.testcase import skip
from heat.engine import clients
from heat.engine.clients import client_plugin
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
from heat.tests.v1_1 import fakes
class ClientsTest(HeatTestCase):
class ClientsTest(common.HeatTestCase):
def test_clients_get_heat_url(self):
con = mock.Mock()
@ -130,7 +130,7 @@ class FooClientsPlugin(client_plugin.ClientPlugin):
pass
class ClientPluginTest(HeatTestCase):
class ClientPluginTest(common.HeatTestCase):
def test_get_client_option(self):
con = mock.Mock()
@ -198,7 +198,7 @@ class ClientPluginTest(HeatTestCase):
self.assertRaises(TypeError, client_plugin.ClientPlugin, c)
class TestClientPluginsInitialise(HeatTestCase):
class TestClientPluginsInitialise(common.HeatTestCase):
@skip('skipped until keystone can read context auth_ref')
def test_create_all_clients(self):
@ -230,7 +230,7 @@ class TestClientPluginsInitialise(HeatTestCase):
self.assertTrue(clients.has_client(plugin_name))
class TestIsNotFound(HeatTestCase):
class TestIsNotFound(common.HeatTestCase):
scenarios = [
('ceilometer_not_found', dict(
@ -685,7 +685,7 @@ class TestIsNotFound(HeatTestCase):
raise
class ClientAPIVersionTest(HeatTestCase):
class ClientAPIVersionTest(common.HeatTestCase):
def test_cinder_api_v1_and_v2(self):
self.stub_keystoneclient()

@ -16,11 +16,11 @@ import mock
from heat.engine import parser
from heat.engine.resources.software_config import cloud_config as cc
from heat.engine import template
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
class CloudConfigTest(HeatTestCase):
class CloudConfigTest(common.HeatTestCase):
def setUp(self):
super(CloudConfigTest, self).setUp()

@ -20,12 +20,12 @@ from heat.common import context
from heat.common import exception
from heat.openstack.common.middleware import request_id
from heat.openstack.common import policy as base_policy
from heat.tests.common import HeatTestCase
from heat.tests import common
policy_path = os.path.dirname(os.path.realpath(__file__)) + "/policy/"
class TestRequestContext(HeatTestCase):
class TestRequestContext(common.HeatTestCase):
def setUp(self):
self.ctx = {'username': 'mick',
@ -104,7 +104,7 @@ class TestRequestContext(HeatTestCase):
self.assertFalse(ctx.is_admin)
class RequestContextMiddlewareTest(HeatTestCase):
class RequestContextMiddlewareTest(common.HeatTestCase):
scenarios = [(
'empty_headers',

@ -12,10 +12,10 @@
# under the License.
from heat.common import param_utils
from heat.tests.common import HeatTestCase
from heat.tests import common
class TestExtractBool(HeatTestCase):
class TestExtractBool(common.HeatTestCase):
def test_extract_bool(self):
for value in ('True', 'true', 'TRUE', True):
self.assertTrue(param_utils.extract_bool(value))

@ -21,13 +21,13 @@ from oslo.config import cfg
from heat.common import exception
from heat.common import policy
from heat.openstack.common import policy as base_policy
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
policy_path = os.path.dirname(os.path.realpath(__file__)) + "/policy/"
class TestPolicyEnforcer(HeatTestCase):
class TestPolicyEnforcer(common.HeatTestCase):
cfn_actions = ("ListStacks", "CreateStack", "DescribeStacks",
"DeleteStack", "UpdateStack", "DescribeStackEvents",
"ValidateTemplate", "GetTemplate",

@ -19,10 +19,10 @@ import datetime
import webob
from heat.common import serializers
from heat.tests.common import HeatTestCase
from heat.tests import common
class JSONResponseSerializerTest(HeatTestCase):
class JSONResponseSerializerTest(common.HeatTestCase):
def test_to_json(self):
fixture = {"key": "value"}
@ -54,7 +54,7 @@ class JSONResponseSerializerTest(HeatTestCase):
self.assertEqual('{"key": "value"}', response.body)
class XMLResponseSerializerTest(HeatTestCase):
class XMLResponseSerializerTest(common.HeatTestCase):
def test_to_xml(self):
fixture = {"key": "value"}

@ -20,7 +20,7 @@ from heat.engine.resources import cloud_watch
from heat.engine import rsrc_defn
from heat.engine import scheduler
from heat.engine import watchrule
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
@ -50,7 +50,7 @@ alarm_template = '''
'''
class CloudWatchAlarmTest(HeatTestCase):
class CloudWatchAlarmTest(common.HeatTestCase):
def setUp(self):
super(CloudWatchAlarmTest, self).setUp()

@ -18,7 +18,7 @@ from heat.engine import parser
from heat.engine import properties
from heat.engine import resource
from heat.engine import template
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
@ -147,7 +147,7 @@ class DBInstance(resource.Resource):
}
class DBInstanceTest(HeatTestCase):
class DBInstanceTest(common.HeatTestCase):
def setUp(self):
super(DBInstanceTest, self).setUp()

@ -24,7 +24,7 @@ from heat.engine import parser
from heat.engine.resources import eip
from heat.engine import rsrc_defn
from heat.engine import scheduler
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
from heat.tests.v1_1 import fakes
@ -155,7 +155,7 @@ ipassoc_template_validate = '''
'''
class EIPTest(HeatTestCase):
class EIPTest(common.HeatTestCase):
def setUp(self):
# force Nova, will test Neutron below
super(EIPTest, self).setUp()
@ -355,7 +355,7 @@ class EIPTest(HeatTestCase):
self.m.VerifyAll()
class AllocTest(HeatTestCase):
class AllocTest(common.HeatTestCase):
def setUp(self):
super(AllocTest, self).setUp()

@ -26,12 +26,12 @@ from heat.engine import parameters
from heat.engine import parser
from heat.engine import resource
from heat.rpc import api as rpc_api
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import generic_resource as generic_rsrc
from heat.tests import utils
class FormatTest(HeatTestCase):
class FormatTest(common.HeatTestCase):
def setUp(self):
super(FormatTest, self).setUp()
@ -310,7 +310,7 @@ class FormatTest(HeatTestCase):
self.assertEqual(expected, info)
class FormatValidateParameterTest(HeatTestCase):
class FormatValidateParameterTest(common.HeatTestCase):
base_template = '''
{
@ -852,7 +852,7 @@ class FormatValidateParameterTest(HeatTestCase):
self.assertEqual(self.expected, param_formated)
class FormatSoftwareConfigDeploymentTest(HeatTestCase):
class FormatSoftwareConfigDeploymentTest(common.HeatTestCase):
def _dummy_software_config(self):
config = mock.Mock()
@ -908,7 +908,7 @@ class FormatSoftwareConfigDeploymentTest(HeatTestCase):
self.assertIsNone(api.format_software_deployment(None))
class TestExtractArgs(HeatTestCase):
class TestExtractArgs(common.HeatTestCase):
def test_timeout_extract(self):
p = {'timeout_mins': '5'}
args = api.extract_args(p)

@ -48,7 +48,7 @@ from heat.engine import template as templatem
from heat.engine import watchrule
from heat.openstack.common import threadgroup
from heat.rpc import api as engine_api
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import fakes as test_fakes
from heat.tests import generic_resource as generic_rsrc
from heat.tests import utils
@ -368,7 +368,7 @@ class DummyThreadGroup(object):
pass
class StackCreateTest(HeatTestCase):
class StackCreateTest(common.HeatTestCase):
def setUp(self):
super(StackCreateTest, self).setUp()
@ -462,7 +462,7 @@ class StackCreateTest(HeatTestCase):
self.assertEqual('COMPLETE', db_s.status, )
class StackServiceCreateUpdateDeleteTest(HeatTestCase):
class StackServiceCreateUpdateDeleteTest(common.HeatTestCase):
def setUp(self):
super(StackServiceCreateUpdateDeleteTest, self).setUp()
@ -1428,7 +1428,7 @@ class StackServiceCreateUpdateDeleteTest(HeatTestCase):
six.text_type(ex))
class StackServiceUpdateActionsNotSupportedTest(HeatTestCase):
class StackServiceUpdateActionsNotSupportedTest(common.HeatTestCase):
scenarios = [
('suspend_in_progress', dict(action='SUSPEND', status='IN_PROGRESS')),
@ -1471,7 +1471,7 @@ class StackServiceUpdateActionsNotSupportedTest(HeatTestCase):
self.m.VerifyAll()
class StackServiceActionsTest(HeatTestCase):
class StackServiceActionsTest(common.HeatTestCase):
def setUp(self):
super(StackServiceActionsTest, self).setUp()
@ -1560,7 +1560,7 @@ class StackServiceActionsTest(HeatTestCase):
self.assertTrue(stack.check.called)
class StackServiceAuthorizeTest(HeatTestCase):
class StackServiceAuthorizeTest(common.HeatTestCase):
def setUp(self):
super(StackServiceAuthorizeTest, self).setUp()
@ -1655,7 +1655,7 @@ class StackServiceAuthorizeTest(HeatTestCase):
self.ctx, self.stack, 'WebServer'))
class StackServiceTest(HeatTestCase):
class StackServiceTest(common.HeatTestCase):
def setUp(self):
super(StackServiceTest, self).setUp()
@ -3060,7 +3060,7 @@ class StackServiceTest(HeatTestCase):
self.ctx, 'test_existing_stack', parsed_template)
class SoftwareConfigServiceTest(HeatTestCase):
class SoftwareConfigServiceTest(common.HeatTestCase):
def setUp(self):
super(SoftwareConfigServiceTest, self).setUp()
@ -3435,7 +3435,7 @@ class SoftwareConfigServiceTest(HeatTestCase):
'http://192.168.2.2/foo/bar', jsonutils.dumps(result_metadata))
class ThreadGroupManagerTest(HeatTestCase):
class ThreadGroupManagerTest(common.HeatTestCase):
def setUp(self):
super(ThreadGroupManagerTest, self).setUp()
self.f = 'function'
@ -3520,7 +3520,7 @@ class ThreadGroupManagerTest(HeatTestCase):
thm.send(stack_id, 'test_message')
class ThreadGroupManagerStopTest(HeatTestCase):
class ThreadGroupManagerStopTest(common.HeatTestCase):
def test_tgm_stop(self):
stack_id = 'test'
done = []
@ -3546,7 +3546,7 @@ class ThreadGroupManagerStopTest(HeatTestCase):
self.assertNotIn(stack_id, thm.events)
class SnapshotServiceTest(HeatTestCase):
class SnapshotServiceTest(common.HeatTestCase):
def setUp(self):
super(SnapshotServiceTest, self).setUp()

@ -19,7 +19,7 @@ from heat.engine import parser
from heat.engine import resource
from heat.engine import rsrc_defn
from heat.engine import template
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import generic_resource as generic_rsrc
from heat.tests import utils
@ -37,7 +37,7 @@ tmpl = {
}
class EventTest(HeatTestCase):
class EventTest(common.HeatTestCase):
def setUp(self):
super(EventTest, self).setUp()

@ -22,7 +22,7 @@ from oslo.messaging._drivers import common as rpc_common
import heat.api.middleware.fault as fault
from heat.common import exception as heat_exc
from heat.common.i18n import _
from heat.tests.common import HeatTestCase
from heat.tests import common
class StackNotFoundChild(heat_exc.StackNotFound):
@ -33,7 +33,7 @@ class ErrorWithNewline(webob.exc.HTTPBadRequest):
pass
class FaultMiddlewareTest(HeatTestCase):
class FaultMiddlewareTest(common.HeatTestCase):
def test_disguised_http_exception_with_newline(self):
wrapper = fault.FaultWrapper(None)

@ -23,7 +23,7 @@ from heat.engine import function
from heat.engine import parser
from heat.engine import resource
from heat.engine import rsrc_defn
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import generic_resource as generic_rsrc
from heat.tests import utils
@ -40,7 +40,7 @@ class TestFunction(function.Function):
return 'wibble'
class FunctionTest(HeatTestCase):
class FunctionTest(common.HeatTestCase):
def test_equal(self):
func = TestFunction(None, 'foo', ['bar', 'baz'])
self.assertTrue(func == 'wibble')
@ -61,7 +61,7 @@ class FunctionTest(HeatTestCase):
self.assertEqual({'foo': ['bar', 'baz']}, copy.deepcopy(func))
class ResolveTest(HeatTestCase):
class ResolveTest(common.HeatTestCase):
def test_resolve_func(self):
func = TestFunction(None, 'foo', ['bar', 'baz'])
@ -99,7 +99,7 @@ class ResolveTest(HeatTestCase):
self.assertIsNot(result, snippet)
class ValidateTest(HeatTestCase):
class ValidateTest(common.HeatTestCase):
def setUp(self):
super(ValidateTest, self).setUp()
self.func = TestFunction(None, 'foo', ['bar', 'baz'])
@ -138,7 +138,7 @@ class ValidateTest(HeatTestCase):
self.assertEqual('Need more arguments', six.text_type(ex))
class DependenciesTest(HeatTestCase):
class DependenciesTest(common.HeatTestCase):
func = TestFunction(None, 'test', None)
scenarios = [
@ -155,7 +155,7 @@ class DependenciesTest(HeatTestCase):
self.assertEqual(2, len(deps))
class ValidateGetAttTest(HeatTestCase):
class ValidateGetAttTest(common.HeatTestCase):
def setUp(self):
super(ValidateGetAttTest, self).setUp()

@ -17,11 +17,11 @@ import uuid
from glanceclient import exc as glance_exceptions
from heat.common import exception
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
class GlanceUtilsTests(HeatTestCase):
class GlanceUtilsTests(common.HeatTestCase):
"""
Basic tests for the helper methods in
:module:'heat.engine.resources.clients.os.glance'.

@ -20,7 +20,7 @@ from heat.common import template_format
from heat.engine import parser
from heat.engine import resource
from heat.engine.resources import glance_image as gi
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
image_template = '''
@ -55,7 +55,7 @@ resources:
'''
class GlanceImageTest(HeatTestCase):
class GlanceImageTest(common.HeatTestCase):
def setUp(self):
super(GlanceImageTest, self).setUp()

@ -25,7 +25,7 @@ from oslo.config import cfg
from heat.common import exception
from heat.common import heat_keystoneclient
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
cfg.CONF.import_opt('region_name_for_services', 'heat.common.config')
@ -33,7 +33,7 @@ cfg.CONF.import_group('keystone_authtoken',
'keystonemiddleware.auth_token')
class KeystoneClientTest(HeatTestCase):
class KeystoneClientTest(common.HeatTestCase):
"""Test cases for heat.common.heat_keystoneclient."""
def setUp(self):

@ -28,7 +28,7 @@ from heat.engine import resource
from heat.engine import resources
from heat.engine import rsrc_defn
from heat.engine import template
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import generic_resource as generic_rsrc
from heat.tests import test_parser
from heat.tests import utils
@ -87,7 +87,7 @@ class DummyClass(object):
self.metadata = metadata
class HOTemplateTest(HeatTestCase):
class HOTemplateTest(common.HeatTestCase):
"""Test processing of HOT templates."""
@staticmethod
@ -882,7 +882,7 @@ class StackTest(test_parser.StackTest):
self.m.VerifyAll()
class StackAttributesTest(HeatTestCase):
class StackAttributesTest(common.HeatTestCase):
"""
Test stack get_attr function when stack was created from HOT template.
"""
@ -979,7 +979,7 @@ class StackAttributesTest(HeatTestCase):
self.assertEqual(self.expected, resolved)
class StackGetAttrValidationTest(HeatTestCase):
class StackGetAttrValidationTest(common.HeatTestCase):
def setUp(self):
super(StackGetAttrValidationTest, self).setUp()
@ -1008,7 +1008,7 @@ class StackGetAttrValidationTest(HeatTestCase):
stack.resources['resource2'].properties['a_string'])
class StackParametersTest(HeatTestCase):
class StackParametersTest(common.HeatTestCase):
"""
Test stack get_param function when stack was created from HOT template.
"""
@ -1096,7 +1096,7 @@ class StackParametersTest(HeatTestCase):
function.resolve(tmpl.parse(stack, self.snippet)))
class HOTParamValidatorTest(HeatTestCase):
class HOTParamValidatorTest(common.HeatTestCase):
"""Test HOTParamValidator"""
def test_multiple_constraint_descriptions(self):

@ -14,11 +14,11 @@ import mock
from heat.common import exception
from heat.engine.clients.os import glance
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
class ImageConstraintTest(HeatTestCase):
class ImageConstraintTest(common.HeatTestCase):
def setUp(self):
super(ImageConstraintTest, self).setUp()

@ -30,7 +30,7 @@ from heat.engine import parser
from heat.engine import resource
from heat.engine.resources import instance as instances
from heat.engine import scheduler
from heat.tests.common import HeatTestCase
from heat.tests import common
from heat.tests import utils
from heat.tests.v1_1 import fakes