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
This commit is contained in:
parent
5622e02a60
commit
09ecdc55a0
@ -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
|
||||
|
||||
@ -71,7 +71,7 @@ wp_template = '''
|
||||
'''
|
||||
|
||||
|
||||
class InstancesTest(HeatTestCase):
|
||||
class InstancesTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(InstancesTest, self).setUp()
|
||||
self.fc = fakes.FakeClient()
|
||||
|
@ -23,7 +23,7 @@ from heat.engine.clients.os import nova
|
||||
from heat.engine import function
|
||||
from heat.engine import parser
|
||||
from heat.engine.resources import instance
|
||||
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 @@ ig_tmpl_with_updt_policy = '''
|
||||
'''
|
||||
|
||||
|
||||
class InstanceGroupTest(HeatTestCase):
|
||||
class InstanceGroupTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(InstanceGroupTest, self).setUp()
|
||||
|
@ -23,7 +23,7 @@ from heat.engine import parser
|
||||
from heat.engine.resources import instance as instances
|
||||
from heat.engine.resources import network_interface as network_interfaces
|
||||
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
|
||||
|
||||
@ -149,7 +149,7 @@ class FakeNeutron(object):
|
||||
return None
|
||||
|
||||
|
||||
class instancesTest(HeatTestCase):
|
||||
class instancesTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(instancesTest, self).setUp()
|
||||
self.fc = fakes.FakeClient()
|
||||
|
@ -12,10 +12,10 @@
|
||||
# under the License.
|
||||
|
||||
from heat.engine.resources import iso_8601
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
|
||||
|
||||
class TestISO8601Constraint(HeatTestCase):
|
||||
class TestISO8601Constraint(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(TestISO8601Constraint, self).setUp()
|
||||
|
@ -16,7 +16,7 @@ import mock
|
||||
from heat.common import lifecycle_plugin_utils
|
||||
from heat.engine import lifecycle_plugin
|
||||
from heat.engine import resources
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
|
||||
|
||||
empty_template = '''
|
||||
@ -26,7 +26,7 @@ resources:
|
||||
'''
|
||||
|
||||
|
||||
class LifecyclePluginUtilsTests(HeatTestCase):
|
||||
class LifecyclePluginUtilsTests(common.HeatTestCase):
|
||||
"""
|
||||
Basic tests for the helper methods in
|
||||
:module:'heat.common.lifecycle_plugin_utils'.
|
||||
|
@ -28,7 +28,7 @@ from heat.engine.resources import loadbalancer as lb
|
||||
from heat.engine.resources import wait_condition as wc
|
||||
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
|
||||
|
||||
@ -100,7 +100,7 @@ lb_template_nokey = '''
|
||||
'''
|
||||
|
||||
|
||||
class LoadBalancerTest(HeatTestCase):
|
||||
class LoadBalancerTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(LoadBalancerTest, self).setUp()
|
||||
self.fc = fakes.FakeClient()
|
||||
|
@ -18,7 +18,7 @@ import pkg_resources
|
||||
import subprocess
|
||||
|
||||
from heat.cloudinit import loguserdata
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
|
||||
|
||||
class FakeCiVersion(object):
|
||||
@ -37,7 +37,7 @@ class FakePOpen(object):
|
||||
pass
|
||||
|
||||
|
||||
class LoguserdataTest(HeatTestCase):
|
||||
class LoguserdataTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(LoguserdataTest, self).setUp()
|
||||
|
@ -24,7 +24,7 @@ from heat.engine.resources import server
|
||||
from heat.engine.resources import wait_condition as wc
|
||||
from heat.engine import scheduler
|
||||
from heat.engine import service
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@ resources:
|
||||
'''
|
||||
|
||||
|
||||
class MetadataRefreshTest(HeatTestCase):
|
||||
class MetadataRefreshTest(common.HeatTestCase):
|
||||
'''
|
||||
The point of the test is to confirm that metadata gets updated
|
||||
when FnGetAtt() returns something different.
|
||||
@ -207,7 +207,7 @@ class MetadataRefreshTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class WaitCondMetadataUpdateTest(HeatTestCase):
|
||||
class WaitCondMetadataUpdateTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(WaitCondMetadataUpdateTest, self).setUp()
|
||||
self.stub_keystoneclient()
|
||||
@ -294,7 +294,7 @@ class WaitCondMetadataUpdateTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class MetadataRefreshTestServer(HeatTestCase):
|
||||
class MetadataRefreshTestServer(common.HeatTestCase):
|
||||
'''
|
||||
The point of the test is to confirm that metadata gets updated
|
||||
when FnGetAtt() returns something different when using a native
|
||||
|
@ -19,11 +19,11 @@ import mock
|
||||
from heat.engine import parser
|
||||
from heat.engine.resources.software_config import multi_part as mp
|
||||
from heat.engine import template
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
class MultipartMimeTest(HeatTestCase):
|
||||
class MultipartMimeTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(MultipartMimeTest, self).setUp()
|
||||
|
@ -28,14 +28,14 @@ from heat.engine import parser
|
||||
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 generic_resource as generic_rsrc
|
||||
from heat.tests import utils
|
||||
|
||||
cfg.CONF.import_opt('max_resources_per_stack', 'heat.common.config')
|
||||
|
||||
|
||||
class NestedStackTest(HeatTestCase):
|
||||
class NestedStackTest(common.HeatTestCase):
|
||||
test_template = '''
|
||||
HeatTemplateFormatVersion: '2012-12-12'
|
||||
Resources:
|
||||
|
@ -15,7 +15,7 @@ import copy
|
||||
|
||||
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
|
||||
|
||||
try:
|
||||
@ -36,7 +36,7 @@ test_template = {
|
||||
}
|
||||
|
||||
|
||||
class NetworkInterfaceTest(HeatTestCase):
|
||||
class NetworkInterfaceTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(NetworkInterfaceTest, self).setUp()
|
||||
self.ctx = utils.dummy_context()
|
||||
|
@ -33,7 +33,7 @@ from heat.engine.resources.neutron import router
|
||||
from heat.engine.resources.neutron import subnet
|
||||
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
|
||||
|
||||
|
||||
@ -500,7 +500,7 @@ stpnb = copy.deepcopy(stpna)
|
||||
stpnb['network']['status'] = "BUILD"
|
||||
|
||||
|
||||
class NeutronTest(HeatTestCase):
|
||||
class NeutronTest(common.HeatTestCase):
|
||||
|
||||
def test_validate_properties(self):
|
||||
vs = {'router:external': True}
|
||||
@ -679,7 +679,7 @@ class NeutronTest(HeatTestCase):
|
||||
self.m.UnsetStubs()
|
||||
|
||||
|
||||
class NeutronNetTest(HeatTestCase):
|
||||
class NeutronNetTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(NeutronNetTest, self).setUp()
|
||||
@ -878,7 +878,7 @@ class NeutronNetTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class NeutronProviderNetTest(HeatTestCase):
|
||||
class NeutronProviderNetTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(NeutronProviderNetTest, self).setUp()
|
||||
@ -996,7 +996,7 @@ class NeutronProviderNetTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class NeutronSubnetTest(HeatTestCase):
|
||||
class NeutronSubnetTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(NeutronSubnetTest, self).setUp()
|
||||
@ -1296,7 +1296,7 @@ class NeutronSubnetTest(HeatTestCase):
|
||||
}, p)
|
||||
|
||||
|
||||
class NeutronRouterTest(HeatTestCase):
|
||||
class NeutronRouterTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(NeutronRouterTest, self).setUp()
|
||||
@ -1913,7 +1913,7 @@ class NeutronRouterTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class NeutronFloatingIPTest(HeatTestCase):
|
||||
class NeutronFloatingIPTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(NeutronFloatingIPTest, self).setUp()
|
||||
@ -2414,7 +2414,7 @@ class NeutronFloatingIPTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class NeutronPortTest(HeatTestCase):
|
||||
class NeutronPortTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(NeutronPortTest, self).setUp()
|
||||
@ -2941,7 +2941,7 @@ class NeutronPortTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class NetworkConstraintTest(HeatTestCase):
|
||||
class NetworkConstraintTest(common.HeatTestCase):
|
||||
|
||||
def test_validate(self):
|
||||
nc = self.m.CreateMockAnything()
|
||||
@ -2965,7 +2965,7 @@ class NetworkConstraintTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class PortConstraintTest(HeatTestCase):
|
||||
class PortConstraintTest(common.HeatTestCase):
|
||||
|
||||
def test_validate(self):
|
||||
nc = self.m.CreateMockAnything()
|
||||
@ -2989,7 +2989,7 @@ class PortConstraintTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class RouterConstraintTest(HeatTestCase):
|
||||
class RouterConstraintTest(common.HeatTestCase):
|
||||
|
||||
def test_validate(self):
|
||||
nc = self.m.CreateMockAnything()
|
||||
@ -3013,7 +3013,7 @@ class RouterConstraintTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class SubnetConstraintTest(HeatTestCase):
|
||||
class SubnetConstraintTest(common.HeatTestCase):
|
||||
|
||||
def test_validate(self):
|
||||
nc = self.m.CreateMockAnything()
|
||||
|
@ -26,7 +26,7 @@ from heat.engine import environment
|
||||
from heat.engine import parser
|
||||
from heat.engine.resources import instance
|
||||
from heat.engine import template
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
from heat.tests.v1_1 import fakes as v1fakes
|
||||
|
||||
@ -99,7 +99,7 @@ as_template = '''
|
||||
'''
|
||||
|
||||
|
||||
class AutoScalingTest(HeatTestCase):
|
||||
class AutoScalingTest(common.HeatTestCase):
|
||||
params = {'KeyName': 'test', 'ImageId': 'foo'}
|
||||
|
||||
def setUp(self):
|
||||
|
@ -15,11 +15,11 @@ import mock
|
||||
|
||||
from heat.common import exception
|
||||
from heat.engine.clients.os import neutron
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
class NeutronClientPluginTestCase(HeatTestCase):
|
||||
class NeutronClientPluginTestCase(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(NeutronClientPluginTestCase, self).setUp()
|
||||
self.neutron_client = mock.MagicMock()
|
||||
|
@ -21,7 +21,7 @@ from heat.common import exception
|
||||
from heat.common import template_format
|
||||
from heat.engine.resources.neutron import firewall
|
||||
from heat.engine import scheduler
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ firewall_rule_template = '''
|
||||
'''
|
||||
|
||||
|
||||
class FirewallTest(HeatTestCase):
|
||||
class FirewallTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(FirewallTest, self).setUp()
|
||||
@ -211,7 +211,7 @@ class FirewallTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class FirewallPolicyTest(HeatTestCase):
|
||||
class FirewallPolicyTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(FirewallPolicyTest, self).setUp()
|
||||
@ -337,7 +337,7 @@ class FirewallPolicyTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class FirewallRuleTest(HeatTestCase):
|
||||
class FirewallRuleTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(FirewallRuleTest, self).setUp()
|
||||
|
@ -26,7 +26,7 @@ from heat.common import template_format
|
||||
from heat.engine.clients.os import nova
|
||||
from heat.engine.resources.neutron import loadbalancer
|
||||
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 as nova_fakes
|
||||
|
||||
@ -221,7 +221,7 @@ pool_with_health_monitors_template = '''
|
||||
'''
|
||||
|
||||
|
||||
class HealthMonitorTest(HeatTestCase):
|
||||
class HealthMonitorTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(HealthMonitorTest, self).setUp()
|
||||
@ -346,7 +346,7 @@ class HealthMonitorTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class PoolTest(HeatTestCase):
|
||||
class PoolTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(PoolTest, self).setUp()
|
||||
@ -843,7 +843,7 @@ class PoolTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class PoolMemberTest(HeatTestCase):
|
||||
class PoolMemberTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(PoolMemberTest, self).setUp()
|
||||
@ -945,7 +945,7 @@ class PoolMemberTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class LoadBalancerTest(HeatTestCase):
|
||||
class LoadBalancerTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(LoadBalancerTest, self).setUp()
|
||||
@ -1031,7 +1031,7 @@ class LoadBalancerTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class PoolUpdateHealthMonitorsTest(HeatTestCase):
|
||||
class PoolUpdateHealthMonitorsTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(PoolUpdateHealthMonitorsTest, self).setUp()
|
||||
|
@ -19,7 +19,7 @@ from heat.common import exception
|
||||
from heat.common import template_format
|
||||
from heat.engine.resources.neutron import metering
|
||||
from heat.engine import scheduler
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ metering_template = '''
|
||||
'''
|
||||
|
||||
|
||||
class MeteringLabelTest(HeatTestCase):
|
||||
class MeteringLabelTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(MeteringLabelTest, self).setUp()
|
||||
@ -159,7 +159,7 @@ class MeteringLabelTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class MeteringRuleTest(HeatTestCase):
|
||||
class MeteringRuleTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(MeteringRuleTest, self).setUp()
|
||||
|
@ -26,7 +26,7 @@ from heat.common import template_format
|
||||
from heat.engine.resources.neutron import network_gateway
|
||||
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
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ sng = {
|
||||
}
|
||||
|
||||
|
||||
class NeutronNetworkGatewayTest(HeatTestCase):
|
||||
class NeutronNetworkGatewayTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(NeutronNetworkGatewayTest, self).setUp()
|
||||
self.m.StubOutWithMock(neutronclient.Client, 'create_network_gateway')
|
||||
|
@ -21,12 +21,12 @@ from heat.common import template_format
|
||||
from heat.engine import parser
|
||||
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 heat.tests.v1_1 import fakes
|
||||
|
||||
|
||||
class SecurityGroupTest(HeatTestCase):
|
||||
class SecurityGroupTest(common.HeatTestCase):
|
||||
|
||||
test_template = '''
|
||||
HeatTemplateFormatVersion: '2012-12-12'
|
||||
|
@ -22,7 +22,7 @@ from heat.common import exception
|
||||
from heat.common import template_format
|
||||
from heat.engine.resources.neutron import vpnservice
|
||||
from heat.engine import scheduler
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
@ -151,7 +151,7 @@ ipsecpolicy_template = '''
|
||||
'''
|
||||
|
||||
|
||||
class VPNServiceTest(HeatTestCase):
|
||||
class VPNServiceTest(common.HeatTestCase):
|
||||
|
||||
VPN_SERVICE_CONF = {
|
||||
'vpnservice': {
|
||||
@ -300,7 +300,7 @@ class VPNServiceTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class IPsecSiteConnectionTest(HeatTestCase):
|
||||
class IPsecSiteConnectionTest(common.HeatTestCase):
|
||||
|
||||
IPSEC_SITE_CONNECTION_CONF = {
|
||||
'ipsec_site_connection': {
|
||||
@ -457,7 +457,7 @@ class IPsecSiteConnectionTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class IKEPolicyTest(HeatTestCase):
|
||||
class IKEPolicyTest(common.HeatTestCase):
|
||||
|
||||
IKE_POLICY_CONF = {
|
||||
'ikepolicy': {
|
||||
@ -598,7 +598,7 @@ class IKEPolicyTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class IPsecPolicyTest(HeatTestCase):
|
||||
class IPsecPolicyTest(common.HeatTestCase):
|
||||
|
||||
IPSEC_POLICY_CONF = {
|
||||
'ipsecpolicy': {
|
||||
|
@ -16,7 +16,7 @@ from heat.engine.clients.os import glance
|
||||
from heat.engine.clients.os import nova
|
||||
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
|
||||
|
||||
@ -40,7 +40,7 @@ nokey_template = '''
|
||||
'''
|
||||
|
||||
|
||||
class nokeyTest(HeatTestCase):
|
||||
class nokeyTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(nokeyTest, self).setUp()
|
||||
self.fc = fakes.FakeClient()
|
||||
|
@ -19,11 +19,11 @@ import uuid
|
||||
|
||||
from heat.common import exception
|
||||
from heat.engine.clients.os import nova
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
class NovaClientPluginTestCase(HeatTestCase):
|
||||
class NovaClientPluginTestCase(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(NovaClientPluginTestCase, self).setUp()
|
||||
self.nova_client = self.m.CreateMockAnything()
|
||||
|
@ -22,7 +22,7 @@ from heat.engine.resources.nova_floatingip import NovaFloatingIp
|
||||
from heat.engine.resources.nova_floatingip import NovaFloatingIpAssociation
|
||||
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
|
||||
|
||||
@ -57,7 +57,7 @@ floating_ip_template_with_assoc = '''
|
||||
'''
|
||||
|
||||
|
||||
class NovaFloatingIPTest(HeatTestCase):
|
||||
class NovaFloatingIPTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(NovaFloatingIPTest, self).setUp()
|
||||
|
@ -19,12 +19,12 @@ from heat.common import exception
|
||||
from heat.engine.clients.os import nova
|
||||
from heat.engine.resources import nova_keypair
|
||||
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
|
||||
|
||||
|
||||
class NovaKeyPairTest(HeatTestCase):
|
||||
class NovaKeyPairTest(common.HeatTestCase):
|
||||
|
||||
kp_template = {
|
||||
"heat_template_version": "2013-05-23",
|
||||
@ -180,7 +180,7 @@ class NovaKeyPairTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class KeypairConstraintTest(HeatTestCase):
|
||||
class KeypairConstraintTest(common.HeatTestCase):
|
||||
|
||||
def test_validation(self):
|
||||
client = fakes.FakeClient()
|
||||
|
@ -16,7 +16,7 @@ import mock
|
||||
|
||||
from heat.common import template_format
|
||||
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
|
||||
|
||||
@ -40,7 +40,7 @@ class FakeGroup(object):
|
||||
self.name = name
|
||||
|
||||
|
||||
class NovaServerGroupTest(HeatTestCase):
|
||||
class NovaServerGroupTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(NovaServerGroupTest, self).setUp()
|
||||
|
||||
|
@ -22,11 +22,11 @@ from novaclient import exceptions as nova_exceptions
|
||||
from heat.common import exception
|
||||
from heat.engine.resources import nova_utils
|
||||
from heat.engine import scheduler
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests.v1_1 import fakes
|
||||
|
||||
|
||||
class NovaUtilsTests(HeatTestCase):
|
||||
class NovaUtilsTests(common.HeatTestCase):
|
||||
"""
|
||||
Basic tests for the helper methods in
|
||||
:module:'heat.engine.resources.nova_utils'.
|
||||
@ -128,7 +128,7 @@ class NovaUtilsTests(HeatTestCase):
|
||||
six.text_type(err))
|
||||
|
||||
|
||||
class NovaUtilsRefreshServerTests(HeatTestCase):
|
||||
class NovaUtilsRefreshServerTests(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(NovaUtilsRefreshServerTests, self).setUp()
|
||||
@ -176,7 +176,7 @@ class NovaUtilsRefreshServerTests(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class NovaUtilsUserdataTests(HeatTestCase):
|
||||
class NovaUtilsUserdataTests(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(NovaUtilsUserdataTests, self).setUp()
|
||||
@ -241,7 +241,7 @@ class NovaUtilsUserdataTests(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class NovaUtilsMetadataTests(HeatTestCase):
|
||||
class NovaUtilsMetadataTests(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(NovaUtilsMetadataTests, self).setUp()
|
||||
|
@ -24,7 +24,7 @@ from heat.engine.clients.os import trove
|
||||
from heat.engine import parser
|
||||
from heat.engine.resources import os_database
|
||||
from heat.engine import scheduler
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
@ -95,7 +95,7 @@ class FakeVersion(object):
|
||||
self.name = name
|
||||
|
||||
|
||||
class OSDBInstanceTest(HeatTestCase):
|
||||
class OSDBInstanceTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(OSDBInstanceTest, self).setUp()
|
||||
self.stub_keystoneclient()
|
||||
|
@ -43,7 +43,7 @@ from heat.engine import resource
|
||||
from heat.engine import rsrc_defn
|
||||
from heat.engine import scheduler
|
||||
from heat.engine import template
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests.fakes import FakeKeystoneClient
|
||||
from heat.tests import generic_resource as generic_rsrc
|
||||
from heat.tests import utils
|
||||
@ -55,7 +55,7 @@ def join(raw):
|
||||
return function.resolve(tmpl.parse(None, raw))
|
||||
|
||||
|
||||
class ParserTest(HeatTestCase):
|
||||
class ParserTest(common.HeatTestCase):
|
||||
|
||||
def test_list(self):
|
||||
raw = ['foo', 'bar', 'baz']
|
||||
@ -162,7 +162,7 @@ class DummyClass(object):
|
||||
self.metadata = metadata
|
||||
|
||||
|
||||
class TemplateTest(HeatTestCase):
|
||||
class TemplateTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(TemplateTest, self).setUp()
|
||||
@ -656,7 +656,7 @@ Mappings:
|
||||
self.assertEqual(cfn_tpl['Resources'], empty.t['Resources'])
|
||||
|
||||
|
||||
class TemplateFnErrorTest(HeatTestCase):
|
||||
class TemplateFnErrorTest(common.HeatTestCase):
|
||||
scenarios = [
|
||||
('select_from_list_not_int',
|
||||
dict(expect=TypeError,
|
||||
@ -778,7 +778,7 @@ class TemplateFnErrorTest(HeatTestCase):
|
||||
self.assertIn(self.snippet.keys()[0], six.text_type(error))
|
||||
|
||||
|
||||
class ResolveDataTest(HeatTestCase):
|
||||
class ResolveDataTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(ResolveDataTest, self).setUp()
|
||||
@ -909,7 +909,7 @@ class ResolveDataTest(HeatTestCase):
|
||||
self.resolve(snippet))
|
||||
|
||||
|
||||
class StackTest(HeatTestCase):
|
||||
class StackTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(StackTest, self).setUp()
|
||||
|
||||
|
@ -17,7 +17,7 @@ import types
|
||||
import six
|
||||
|
||||
from heat.engine import plugin_manager
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
|
||||
|
||||
def legacy_test_mapping():
|
||||
@ -44,7 +44,7 @@ class MappingTestError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class TestPluginManager(HeatTestCase):
|
||||
class TestPluginManager(common.HeatTestCase):
|
||||
|
||||
@staticmethod
|
||||
def module():
|
||||
|
@ -32,7 +32,7 @@ from heat.engine import resources
|
||||
from heat.engine.resources import template_resource
|
||||
from heat.engine import rsrc_defn
|
||||
from heat.engine import support
|
||||
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
|
||||
|
||||
@ -44,7 +44,7 @@ class MyCloudResource(generic_rsrc.GenericResource):
|
||||
pass
|
||||
|
||||
|
||||
class ProviderTemplateTest(HeatTestCase):
|
||||
class ProviderTemplateTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(ProviderTemplateTest, self).setUp()
|
||||
resource._register_class('OS::ResourceType',
|
||||
@ -693,7 +693,7 @@ class ProviderTemplateTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class NestedProvider(HeatTestCase):
|
||||
class NestedProvider(common.HeatTestCase):
|
||||
"""Prove that we can use the registry in a nested provider."""
|
||||
|
||||
def setUp(self):
|
||||
@ -781,7 +781,7 @@ resource_registry:
|
||||
self.assertEqual((stack.CREATE, stack.COMPLETE), stack.state)
|
||||
|
||||
|
||||
class ProviderTemplateUpdateTest(HeatTestCase):
|
||||
class ProviderTemplateUpdateTest(common.HeatTestCase):
|
||||
main_template = '''
|
||||
HeatTemplateFormatVersion: '2012-12-12'
|
||||
Resources:
|
||||
@ -938,7 +938,7 @@ Outputs:
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class ProviderTemplateAdoptTest(HeatTestCase):
|
||||
class ProviderTemplateAdoptTest(common.HeatTestCase):
|
||||
main_template = '''
|
||||
HeatTemplateFormatVersion: '2012-12-12'
|
||||
Resources:
|
||||
|
@ -22,11 +22,11 @@ from heat.common import template_format
|
||||
from heat.engine import parser
|
||||
from heat.engine.resources.random_string import RandomString
|
||||
from heat.engine import template
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
class TestRandomString(HeatTestCase):
|
||||
class TestRandomString(common.HeatTestCase):
|
||||
|
||||
template_random_string = '''
|
||||
HeatTemplateFormatVersion: '2012-12-12'
|
||||
@ -195,7 +195,7 @@ Resources:
|
||||
six.text_type(exc))
|
||||
|
||||
|
||||
class TestGenerateRandomString(HeatTestCase):
|
||||
class TestGenerateRandomString(common.HeatTestCase):
|
||||
|
||||
scenarios = [
|
||||
('lettersdigits', dict(
|
||||
|
@ -34,7 +34,7 @@ from heat.engine import resources
|
||||
from heat.engine import rsrc_defn
|
||||
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 generic_resource as generic_rsrc
|
||||
from heat.tests import utils
|
||||
|
||||
@ -44,7 +44,7 @@ import neutronclient.common.exceptions as neutron_exp
|
||||
empty_template = {"HeatTemplateFormatVersion": "2012-12-12"}
|
||||
|
||||
|
||||
class ResourceTest(HeatTestCase):
|
||||
class ResourceTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(ResourceTest, self).setUp()
|
||||
|
||||
@ -1064,7 +1064,7 @@ class ResourceTest(HeatTestCase):
|
||||
self._test_skip_validation_if_custom_constraint(tmpl)
|
||||
|
||||
|
||||
class ResourceAdoptTest(HeatTestCase):
|
||||
class ResourceAdoptTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(ResourceAdoptTest, self).setUp()
|
||||
resource._register_class('GenericResourceType',
|
||||
@ -1153,7 +1153,7 @@ class ResourceAdoptTest(HeatTestCase):
|
||||
self.assertEqual(expected, res.status_reason)
|
||||
|
||||
|
||||
class ResourceDependenciesTest(HeatTestCase):
|
||||
class ResourceDependenciesTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(ResourceDependenciesTest, self).setUp()
|
||||
|
||||
@ -1629,7 +1629,7 @@ class ResourceDependenciesTest(HeatTestCase):
|
||||
self.assertIn('"wibble" (in foo)', six.text_type(ex))
|
||||
|
||||
|
||||
class MetadataTest(HeatTestCase):
|
||||
class MetadataTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(MetadataTest, self).setUp()
|
||||
self.stack = parser.Stack(utils.dummy_context(),
|
||||
@ -1663,7 +1663,7 @@ class MetadataTest(HeatTestCase):
|
||||
self.assertEqual(test_data, self.res.metadata)
|
||||
|
||||
|
||||
class ReducePhysicalResourceNameTest(HeatTestCase):
|
||||
class ReducePhysicalResourceNameTest(common.HeatTestCase):
|
||||
scenarios = [
|
||||
('one', dict(
|
||||
limit=10,
|
||||
|
@ -11,7 +11,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
|
||||
from heat.common import exception
|
||||
from heat.engine.cfn import functions as cfn_funcs
|
||||
@ -20,7 +20,7 @@ from heat.engine import properties
|
||||
from heat.engine import rsrc_defn
|
||||
|
||||
|
||||
class ResourceDefinitionTest(HeatTestCase):
|
||||
class ResourceDefinitionTest(common.HeatTestCase):
|
||||
|
||||
def make_me_one_with_everything(self):
|
||||
return rsrc_defn.ResourceDefinition(
|
||||
@ -175,7 +175,7 @@ class ResourceDefinitionTest(HeatTestCase):
|
||||
self.assertNotEqual(hash(rd1), hash(rd2))
|
||||
|
||||
|
||||
class ResourceDefinitionSnippetTest(HeatTestCase):
|
||||
class ResourceDefinitionSnippetTest(common.HeatTestCase):
|
||||
def test_type(self):
|
||||
rd = rsrc_defn.ResourceDefinition('rsrc', 'SomeType')
|
||||
self.assertEqual({'Type': 'SomeType'}, rd)
|
||||
|
@ -18,7 +18,7 @@ from heat.common import exception
|
||||
from heat.common import template_format
|
||||
from heat.engine.resources import s3
|
||||
from heat.engine import scheduler
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ swift_template = '''
|
||||
'''
|
||||
|
||||
|
||||
class s3Test(HeatTestCase):
|
||||
class s3Test(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(s3Test, self).setUp()
|
||||
self.m.CreateMock(sc.Connection)
|
||||
|
@ -24,7 +24,7 @@ from heat.engine.clients.os import neutron
|
||||
from heat.engine.clients.os import sahara
|
||||
from heat.engine.resources import sahara_cluster as sc
|
||||
from heat.engine import scheduler
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ class FakeCluster(object):
|
||||
"Web UI": "http://host_ip:port"}}
|
||||
|
||||
|
||||
class SaharaClusterTest(HeatTestCase):
|
||||
class SaharaClusterTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(SaharaClusterTest, self).setUp()
|
||||
self.patchobject(sc.constraints.CustomConstraint, '_is_valid'
|
||||
|
@ -23,7 +23,7 @@ from heat.engine.clients.os import nova
|
||||
from heat.engine.clients.os import sahara
|
||||
from heat.engine.resources import sahara_templates as st
|
||||
from heat.engine import scheduler
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
node_group_template = """
|
||||
@ -69,7 +69,7 @@ class FakeClusterTemplate(object):
|
||||
self.name = "node-group-template"
|
||||
|
||||
|
||||
class SaharaNodeGroupTemplateTest(HeatTestCase):
|
||||
class SaharaNodeGroupTemplateTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(SaharaNodeGroupTemplateTest, self).setUp()
|
||||
self.patchobject(st.constraints.CustomConstraint,
|
||||
@ -152,7 +152,7 @@ class SaharaNodeGroupTemplateTest(HeatTestCase):
|
||||
six.text_type(ex))
|
||||
|
||||
|
||||
class SaharaClusterTemplateTest(HeatTestCase):
|
||||
class SaharaClusterTemplateTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(SaharaClusterTemplateTest, self).setUp()
|
||||
self.patchobject(st.constraints.CustomConstraint, '_is_valid'
|
||||
|
@ -15,10 +15,10 @@ import itertools
|
||||
|
||||
from heat.common import short_id
|
||||
from heat.scaling import template
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
|
||||
|
||||
class ResourceTemplatesTest(HeatTestCase):
|
||||
class ResourceTemplatesTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(ResourceTemplatesTest, self).setUp()
|
||||
|
@ -17,7 +17,7 @@ import eventlet
|
||||
|
||||
from heat.engine import dependencies
|
||||
from heat.engine import scheduler
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
|
||||
|
||||
class DummyTask(object):
|
||||
@ -33,7 +33,7 @@ class DummyTask(object):
|
||||
pass
|
||||
|
||||
|
||||
class PollingTaskGroupTest(HeatTestCase):
|
||||
class PollingTaskGroupTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(PollingTaskGroupTest, self).setUp()
|
||||
@ -161,7 +161,7 @@ class PollingTaskGroupTest(HeatTestCase):
|
||||
dummy.do_step(1, i, i * i)
|
||||
|
||||
|
||||
class ExceptionGroupTest(HeatTestCase):
|
||||
class ExceptionGroupTest(common.HeatTestCase):
|
||||
|
||||
def test_contains_exceptions(self):
|
||||
exception_group = scheduler.ExceptionGroup()
|
||||
@ -190,7 +190,7 @@ class ExceptionGroupTest(HeatTestCase):
|
||||
self.assertEqual("['ex 1', 'ex 2']", str(exception_group))
|
||||
|
||||
|
||||
class DependencyTaskGroupTest(HeatTestCase):
|
||||
class DependencyTaskGroupTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(DependencyTaskGroupTest, self).setUp()
|
||||
self.addCleanup(self.m.VerifyAll)
|
||||
@ -440,7 +440,7 @@ class DependencyTaskGroupTest(HeatTestCase):
|
||||
self.assertEqual(e1, exc)
|
||||
|
||||
|
||||
class TaskTest(HeatTestCase):
|
||||
class TaskTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(TaskTest, self).setUp()
|
||||
@ -892,7 +892,7 @@ class TaskTest(HeatTestCase):
|
||||
self.assertTrue(runner.done())
|
||||
|
||||
|
||||
class TimeoutTest(HeatTestCase):
|
||||
class TimeoutTest(common.HeatTestCase):
|
||||
def test_compare(self):
|
||||
task = scheduler.TaskRunner(DummyTask())
|
||||
|
||||
@ -906,7 +906,7 @@ class TimeoutTest(HeatTestCase):
|
||||
self.assertNotEqual(earlier, later)
|
||||
|
||||
|
||||
class DescriptionTest(HeatTestCase):
|
||||
class DescriptionTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(DescriptionTest, self).setUp()
|
||||
@ -950,7 +950,7 @@ class DescriptionTest(HeatTestCase):
|
||||
self.assertEqual('o', scheduler.task_description(C()))
|
||||
|
||||
|
||||
class WrapperTaskTest(HeatTestCase):
|
||||
class WrapperTaskTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(WrapperTaskTest, self).setUp()
|
||||
|
@ -25,7 +25,7 @@ from heat.engine.clients.os import nova
|
||||
from heat.engine import parser
|
||||
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 heat.tests.v1_1 import fakes
|
||||
|
||||
@ -39,7 +39,7 @@ NovaSG = collections.namedtuple('NovaSG',
|
||||
]))
|
||||
|
||||
|
||||
class SecurityGroupTest(HeatTestCase):
|
||||
class SecurityGroupTest(common.HeatTestCase):
|
||||
|
||||
test_template_nova = '''
|
||||
HeatTemplateFormatVersion: '2012-12-12'
|
||||
|
@ -36,7 +36,7 @@ from heat.engine.resources import server as servers
|
||||
from heat.engine import scheduler
|
||||
from heat.engine import template
|
||||
from heat.openstack.common import uuidutils
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import fakes
|
||||
from heat.tests import utils
|
||||
from heat.tests.v1_1 import fakes as fakes_v1_1
|
||||
@ -98,7 +98,7 @@ resources:
|
||||
'''
|
||||
|
||||
|
||||
class ServersTest(HeatTestCase):
|
||||
class ServersTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(ServersTest, self).setUp()
|
||||
self.fc = fakes_v1_1.FakeClient()
|
||||
@ -2702,7 +2702,7 @@ class ServersTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class FlavorConstraintTest(HeatTestCase):
|
||||
class FlavorConstraintTest(common.HeatTestCase):
|
||||
|
||||
def test_validate(self):
|
||||
client = fakes.FakeClient()
|
||||
|
@ -23,7 +23,7 @@ from heat.engine import environment
|
||||
from heat.engine import parser
|
||||
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
|
||||
|
||||
@ -124,7 +124,7 @@ autoscaling_template = '''
|
||||
'''
|
||||
|
||||
|
||||
class ServerTagsTest(HeatTestCase):
|
||||
class ServerTagsTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(ServerTagsTest, self).setUp()
|
||||
self.fc = fakes.FakeClient()
|
||||
|
@ -24,7 +24,7 @@ from heat.engine import resource
|
||||
from heat.engine import scheduler
|
||||
from heat.engine import stack_user
|
||||
from heat.engine import template
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import fakes
|
||||
from heat.tests import generic_resource
|
||||
from heat.tests import utils
|
||||
@ -43,7 +43,7 @@ test_template_signal = '''
|
||||
'''
|
||||
|
||||
|
||||
class SignalTest(HeatTestCase):
|
||||
class SignalTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(SignalTest, self).setUp()
|
||||
|
@ -19,12 +19,12 @@ from heat.common import template_format
|
||||
from heat.engine.resources.software_config import software_component as sc
|
||||
from heat.engine import stack
|
||||
from heat.engine import template
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
from heatclient.exc import HTTPNotFound
|
||||
|
||||
|
||||
class SoftwareComponentTest(HeatTestCase):
|
||||
class SoftwareComponentTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(SoftwareComponentTest, self).setUp()
|
||||
@ -105,7 +105,7 @@ class SoftwareComponentTest(HeatTestCase):
|
||||
self.assertIsNone(self.component._resolve_attribute('configs'))
|
||||
|
||||
|
||||
class SoftwareComponentValidationTest(HeatTestCase):
|
||||
class SoftwareComponentValidationTest(common.HeatTestCase):
|
||||
|
||||
scenarios = [
|
||||
(
|
||||
|
@ -17,11 +17,11 @@ import mock
|
||||
from heat.engine import parser
|
||||
from heat.engine.resources.software_config import software_config as sc
|
||||
from heat.engine import template
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
class SoftwareConfigTest(HeatTestCase):
|
||||
class SoftwareConfigTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(SoftwareConfigTest, self).setUp()
|
||||
|
@ -23,11 +23,11 @@ from heat.engine import parser
|
||||
from heat.engine.resources.software_config import software_deployment as sd
|
||||
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 utils
|
||||
|
||||
|
||||
class SoftwareDeploymentTest(HeatTestCase):
|
||||
class SoftwareDeploymentTest(common.HeatTestCase):
|
||||
|
||||
template = {
|
||||
'HeatTemplateFormatVersion': '2012-12-12',
|
||||
@ -785,7 +785,7 @@ class SoftwareDeploymentTest(HeatTestCase):
|
||||
self.assertIsNotNone(self.deployment._handle_action(action))
|
||||
|
||||
|
||||
class SoftwareDeploymentsTest(HeatTestCase):
|
||||
class SoftwareDeploymentsTest(common.HeatTestCase):
|
||||
|
||||
template = {
|
||||
'heat_template_version': '2013-05-23',
|
||||
@ -803,7 +803,7 @@ class SoftwareDeploymentsTest(HeatTestCase):
|
||||
}
|
||||
|
||||
def setUp(self):
|
||||
HeatTestCase.setUp(self)
|
||||
common.HeatTestCase.setUp(self)
|
||||
heat = mock.MagicMock()
|
||||
self.deployments = heat.return_value.software_deployments
|
||||
|
||||
|
@ -34,7 +34,7 @@ from heat.engine import parser
|
||||
from heat.engine.resource 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
|
||||
|
||||
@ -86,7 +86,7 @@ class MyResource(Resource):
|
||||
self.data_set('my_secret', my_secret, True)
|
||||
|
||||
|
||||
class SqlAlchemyTest(HeatTestCase):
|
||||
class SqlAlchemyTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(SqlAlchemyTest, self).setUp()
|
||||
self.fc = fakes.FakeClient()
|
||||
@ -1173,7 +1173,7 @@ def create_watch_data(ctx, watch_rule, **kwargs):
|
||||
return db_api.watch_data_create(ctx, values)
|
||||
|
||||
|
||||
class DBAPIRawTemplateTest(HeatTestCase):
|
||||
class DBAPIRawTemplateTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(DBAPIRawTemplateTest, self).setUp()
|
||||
self.ctx = utils.dummy_context()
|
||||
@ -1235,7 +1235,7 @@ class DBAPIRawTemplateTest(HeatTestCase):
|
||||
self.assertEqual(updated_tp.files, new_files)
|
||||
|
||||
|
||||
class DBAPIUserCredsTest(HeatTestCase):
|
||||
class DBAPIUserCredsTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(DBAPIUserCredsTest, self).setUp()
|
||||
self.ctx = utils.dummy_context()
|
||||
@ -1284,7 +1284,7 @@ class DBAPIUserCredsTest(HeatTestCase):
|
||||
self.assertIn(exp_msg, six.text_type(err))
|
||||
|
||||
|
||||
class DBAPIStackTest(HeatTestCase):
|
||||
class DBAPIStackTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(DBAPIStackTest, self).setUp()
|
||||
self.ctx = utils.dummy_context()
|
||||
@ -1542,7 +1542,7 @@ class DBAPIStackTest(HeatTestCase):
|
||||
self.assertEqual('a' * 255, stack.status_reason)
|
||||
|
||||
|
||||
class DBAPIResourceTest(HeatTestCase):
|
||||
class DBAPIResourceTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(DBAPIResourceTest, self).setUp()
|
||||
self.ctx = utils.dummy_context()
|
||||
@ -1634,7 +1634,7 @@ class DBAPIResourceTest(HeatTestCase):
|
||||
self.assertEqual('a' * 255, ret_res.status_reason)
|
||||
|
||||
|
||||
class DBAPIStackLockTest(HeatTestCase):
|
||||
class DBAPIStackLockTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(DBAPIStackLockTest, self).setUp()
|
||||
self.ctx = utils.dummy_context()
|
||||
@ -1694,7 +1694,7 @@ class DBAPIStackLockTest(HeatTestCase):
|
||||
self.assertTrue(observed)
|
||||
|
||||
|
||||
class DBAPIResourceDataTest(HeatTestCase):
|
||||
class DBAPIResourceDataTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(DBAPIResourceDataTest, self).setUp()
|
||||
self.ctx = utils.dummy_context()
|
||||
@ -1745,7 +1745,7 @@ class DBAPIResourceDataTest(HeatTestCase):
|
||||
self.assertIsNotNone(res_data)
|
||||
|
||||
|
||||
class DBAPIEventTest(HeatTestCase):
|
||||
class DBAPIEventTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(DBAPIEventTest, self).setUp()
|
||||
self.ctx = utils.dummy_context()
|
||||
@ -1864,7 +1864,7 @@ class DBAPIEventTest(HeatTestCase):
|
||||
self.assertEqual('a' * 255, ret_event.resource_status_reason)
|
||||
|
||||
|
||||
class DBAPIWatchRuleTest(HeatTestCase):
|
||||
class DBAPIWatchRuleTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(DBAPIWatchRuleTest, self).setUp()
|
||||
self.ctx = utils.dummy_context()
|
||||
@ -1944,7 +1944,7 @@ class DBAPIWatchRuleTest(HeatTestCase):
|
||||
self.assertEqual([], db_api.watch_data_get_all(self.ctx))
|
||||
|
||||
|
||||
class DBAPIWatchDataTest(HeatTestCase):
|
||||
class DBAPIWatchDataTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(DBAPIWatchDataTest, self).setUp()
|
||||
self.ctx = utils.dummy_context()
|
||||
|
@ -14,10 +14,10 @@
|
||||
import mock
|
||||
|
||||
from heat.db.sqlalchemy import filters as db_filters
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
|
||||
|
||||
class ExactFilterTest(HeatTestCase):
|
||||
class ExactFilterTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(ExactFilterTest, self).setUp()
|
||||
self.query = mock.Mock()
|
||||
|
@ -15,10 +15,10 @@ from oslo.config import cfg
|
||||
import webob
|
||||
|
||||
from heat.api.middleware import ssl
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
|
||||
|
||||
class SSLMiddlewareTest(HeatTestCase):
|
||||
class SSLMiddlewareTest(common.HeatTestCase):
|
||||
scenarios = [('with_forwarded_proto_default_header',
|
||||
dict(forwarded_protocol='https',
|
||||
secure_proxy_ssl_header=None,
|
||||
|
@ -18,11 +18,11 @@ from oslo import messaging
|
||||
from heat.common import exception
|
||||
from heat.db import api as db_api
|
||||
from heat.engine import stack_lock
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
class StackLockTest(HeatTestCase):
|
||||
class StackLockTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(StackLockTest, self).setUp()
|
||||
self.context = utils.dummy_context()
|
||||
|
@ -25,7 +25,7 @@ from heat.engine import scheduler
|
||||
from heat.engine import stack as parser
|
||||
from heat.engine import stack_resource
|
||||
from heat.engine import template as templatem
|
||||
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
|
||||
|
||||
@ -100,7 +100,7 @@ class MyImplementedStackResource(MyStackResource):
|
||||
return self.nested_params
|
||||
|
||||
|
||||
class StackResourceTest(HeatTestCase):
|
||||
class StackResourceTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(StackResourceTest, self).setUp()
|
||||
resource._register_class('some_magic_type',
|
||||
|
@ -22,7 +22,7 @@ from heat.db import api as db_api
|
||||
from heat.engine import resource
|
||||
from heat.engine import scheduler
|
||||
from heat.engine import stack_user
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import fakes
|
||||
from heat.tests import generic_resource
|
||||
from heat.tests import utils
|
||||
@ -37,7 +37,7 @@ resources:
|
||||
'''
|
||||
|
||||
|
||||
class StackUserTest(HeatTestCase):
|
||||
class StackUserTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(StackUserTest, self).setUp()
|
||||
|
@ -16,11 +16,11 @@ import mock
|
||||
from heat.engine import parser
|
||||
from heat.engine.resources.software_config import structured_config as sc
|
||||
from heat.engine import template
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
class StructuredConfigTestJSON(HeatTestCase):
|
||||
class StructuredConfigTestJSON(common.HeatTestCase):
|
||||
|
||||
template = {
|
||||
'HeatTemplateFormatVersion': '2012-12-12',
|
||||
@ -70,7 +70,7 @@ class StructuredConfigTestJSON(HeatTestCase):
|
||||
self.assertEqual(self.stored_config, kwargs['config'])
|
||||
|
||||
|
||||
class StructuredDeploymentDerivedTest(HeatTestCase):
|
||||
class StructuredDeploymentDerivedTest(common.HeatTestCase):
|
||||
|
||||
template = {
|
||||
'HeatTemplateFormatVersion': '2012-12-12',
|
||||
@ -105,7 +105,7 @@ class StructuredDeploymentDerivedTest(HeatTestCase):
|
||||
self.assertEqual({"foo": "baz"}, result)
|
||||
|
||||
|
||||
class StructuredDeploymentParseTest(HeatTestCase):
|
||||
class StructuredDeploymentParseTest(common.HeatTestCase):
|
||||
|
||||
scenarios = [
|
||||
(
|
||||
@ -197,7 +197,7 @@ class StructuredDeploymentParseTest(HeatTestCase):
|
||||
parse(self.inputs, self.input_key, self.config))
|
||||
|
||||
|
||||
class StructuredDeploymentsTest(HeatTestCase):
|
||||
class StructuredDeploymentsTest(common.HeatTestCase):
|
||||
|
||||
template = {
|
||||
'heat_template_version': '2013-05-23',
|
||||
@ -213,7 +213,7 @@ class StructuredDeploymentsTest(HeatTestCase):
|
||||
}
|
||||
|
||||
def setUp(self):
|
||||
HeatTestCase.setUp(self)
|
||||
common.HeatTestCase.setUp(self)
|
||||
heat = mock.MagicMock()
|
||||
self.deployments = heat.return_value.software_deployments
|
||||
|
||||
|
@ -12,10 +12,10 @@
|
||||
# under the License.
|
||||
|
||||
from heat.engine import support
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
|
||||
|
||||
class SupportStatusTest(HeatTestCase):
|
||||
class SupportStatusTest(common.HeatTestCase):
|
||||
def test_valid_status(self):
|
||||
status = support.SupportStatus(
|
||||
status=support.DEPRECATED,
|
||||
|
@ -19,7 +19,7 @@ from heat.common import exception
|
||||
from heat.common import template_format
|
||||
from heat.engine.resources import swift
|
||||
from heat.engine import scheduler
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ swift_template = '''
|
||||
'''
|
||||
|
||||
|
||||
class swiftTest(HeatTestCase):
|
||||
class swiftTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(swiftTest, self).setUp()
|
||||
self.m.CreateMock(sc.Connection)
|
||||
|
@ -15,11 +15,11 @@ import mock
|
||||
from testtools.matchers import MatchesRegex
|
||||
|
||||
from heat.engine.clients.os import swift
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
class SwiftClientPluginTestCase(HeatTestCase):
|
||||
class SwiftClientPluginTestCase(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(SwiftClientPluginTestCase, self).setUp()
|
||||
self.swift_client = mock.Mock()
|
||||
|
@ -30,7 +30,7 @@ from heat.engine import resource
|
||||
from heat.engine import rsrc_defn
|
||||
from heat.engine import scheduler
|
||||
from heat.engine import stack
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ def cont_index(obj_name, num_version_hist):
|
||||
return (container_header, objects)
|
||||
|
||||
|
||||
class SwiftSignalHandleTest(HeatTestCase):
|
||||
class SwiftSignalHandleTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(SwiftSignalHandleTest, self).setUp()
|
||||
utils.setup_dummy_db()
|
||||
@ -278,7 +278,7 @@ class SwiftSignalHandleTest(HeatTestCase):
|
||||
self.assertRaises(resource.UpdateReplace, updater)
|
||||
|
||||
|
||||
class SwiftSignalTest(HeatTestCase):
|
||||
class SwiftSignalTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(SwiftSignalTest, self).setUp()
|
||||
utils.setup_dummy_db()
|
||||
|
@ -20,11 +20,11 @@ import yaml
|
||||
from heat.common import config
|
||||
from heat.common import exception
|
||||
from heat.common import template_format
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
|
||||
|
||||
class JsonToYamlTest(HeatTestCase):
|
||||
class JsonToYamlTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(JsonToYamlTest, self).setUp()
|
||||
@ -76,7 +76,7 @@ class JsonToYamlTest(HeatTestCase):
|
||||
yield (json_str, yml_str, f.name)
|
||||
|
||||
|
||||
class YamlMinimalTest(HeatTestCase):
|
||||
class YamlMinimalTest(common.HeatTestCase):
|
||||
|
||||
def _parse_template(self, tmpl_str, msg_str):
|
||||
parse_ex = self.assertRaises(ValueError,
|
||||
@ -133,7 +133,7 @@ Outputs: {}
|
||||
self.assertEqual(expected, template_format.parse(tmpl_str))
|
||||
|
||||
|
||||
class YamlParseExceptions(HeatTestCase):
|
||||
class YamlParseExceptions(common.HeatTestCase):
|
||||
|
||||
scenarios = [
|
||||
('scanner', dict(raised_exception=yaml.scanner.ScannerError())),
|
||||
@ -154,7 +154,7 @@ class YamlParseExceptions(HeatTestCase):
|
||||
self.assertIn('Error parsing template: ', six.text_type(err))
|
||||
|
||||
|
||||
class JsonYamlResolvedCompareTest(HeatTestCase):
|
||||
class JsonYamlResolvedCompareTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(JsonYamlResolvedCompareTest, self).setUp()
|
||||
|
@ -14,10 +14,10 @@
|
||||
from testtools import matchers
|
||||
|
||||
from heat.common import timeutils as util
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
|
||||
|
||||
class ISO8601UtilityTest(HeatTestCase):
|
||||
class ISO8601UtilityTest(common.HeatTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(ISO8601UtilityTest, self).setUp()
|
||||
@ -46,7 +46,7 @@ class ISO8601UtilityTest(HeatTestCase):
|
||||
self.assertRaises(ValueError, util.parse_isoduration, 'ABCDEFGH')
|
||||
|
||||
|
||||
class RetryBackoffExponentialTest(HeatTestCase):
|
||||
class RetryBackoffExponentialTest(common.HeatTestCase):
|
||||
|
||||
scenarios = [(
|
||||
'0_0',
|
||||
@ -105,7 +105,7 @@ class RetryBackoffExponentialTest(HeatTestCase):
|
||||
self.assertEqual(delay, self.delay)
|
||||
|
||||
|
||||
class RetryBackoffJitterTest(HeatTestCase):
|
||||
class RetryBackoffJitterTest(common.HeatTestCase):
|
||||
|
||||
scenarios = [(
|
||||
'0_0_1',
|
||||
|
@ -19,7 +19,7 @@ from six.moves import cStringIO
|
||||
from six.moves import urllib
|
||||
|
||||
from heat.common import urlfetch
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
|
||||
|
||||
class Response(object):
|
||||
@ -35,7 +35,7 @@ class Response(object):
|
||||
pass
|
||||
|
||||
|
||||
class UrlFetchTest(HeatTestCase):
|
||||
class UrlFetchTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(UrlFetchTest, self).setUp()
|
||||
self.m.StubOutWithMock(requests, 'get')
|
||||
|
@ -19,7 +19,7 @@ from heat.common import template_format
|
||||
from heat.db import api as db_api
|
||||
from heat.engine.resources import user
|
||||
from heat.engine import scheduler
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import fakes
|
||||
from heat.tests import utils
|
||||
|
||||
@ -100,7 +100,7 @@ user_policy_template = '''
|
||||
'''
|
||||
|
||||
|
||||
class UserTest(HeatTestCase):
|
||||
class UserTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(UserTest, self).setUp()
|
||||
self.username = 'test_stack-CfnUser-aabbcc'
|
||||
@ -271,7 +271,7 @@ class UserTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class AccessKeyTest(HeatTestCase):
|
||||
class AccessKeyTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(AccessKeyTest, self).setUp()
|
||||
self.username = utils.PhysName('test_stack', 'CfnUser')
|
||||
@ -389,7 +389,7 @@ class AccessKeyTest(HeatTestCase):
|
||||
self.m.VerifyAll()
|
||||
|
||||
|
||||
class AccessPolicyTest(HeatTestCase):
|
||||
class AccessPolicyTest(common.HeatTestCase):
|
||||
|
||||
def test_accesspolicy_create_ok(self):
|
||||
t = template_format.parse(user_policy_template)
|
||||
|
@ -24,7 +24,7 @@ from heat.engine.hot.template import HOTemplate20130523
|
||||
from heat.engine import parser
|
||||
from heat.engine import resources
|
||||
from heat.engine import service
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
from heat.tests import utils
|
||||
from heat.tests.v1_1 import fakes
|
||||
|
||||
@ -804,7 +804,7 @@ resources:
|
||||
'''
|
||||
|
||||
|
||||
class validateTest(HeatTestCase):
|
||||
class validateTest(common.HeatTestCase):
|
||||
def setUp(self):
|
||||
super(validateTest, self).setUp()
|
||||
resources.initialise()
|
||||
|
@ -14,14 +14,14 @@
|
||||
import webob
|
||||
|
||||
from heat.api.middleware.version_negotiation import VersionNegotiationFilter
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests import common
|
||||
|
||||
|
||||
class VersionController(object):
|
||||
pass
|
||||
|
||||
|
||||
class VersionNegotiationMiddlewareTest(HeatTestCase):
|
||||
class VersionNegotiationMiddlewareTest(common.HeatTestCase):
|
||||
def _version_controller_factory(self, conf):
|
||||
return VersionController()
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user