Register ResourceWithComplexAttributes in HeatTest

Move registration of the ResourceWithComplexAttributes resource to the
main test class.

Change-Id: I85e175df4889db31adc02e325eed362d710baca0
This commit is contained in:
Sergey Kraynev 2015-06-09 00:43:11 -04:00
parent a520f7193e
commit 4f3919e94e
3 changed files with 3 additions and 11 deletions

View File

@ -129,6 +129,8 @@ class HeatTestCase(testscenarios.WithScenarios,
generic_rsrc.ResourceWithResourceID)
resource._register_class('ResWithComplexPropsAndAttrs',
generic_rsrc.ResWithComplexPropsAndAttrs)
resource._register_class('ResourceWithComplexAttributesType',
generic_rsrc.ResourceWithComplexAttributes)
def stub_wallclock(self):
"""

View File

@ -900,8 +900,6 @@ class HotStackTest(common.HeatTestCase):
generic_rsrc.GenericResource)
resource._register_class('ResourceWithPropsType',
generic_rsrc.ResourceWithProps)
resource._register_class('ResourceWithComplexAttributesType',
generic_rsrc.ResourceWithComplexAttributes)
def resolve(self, snippet):
return function.resolve(self.stack.t.parse(self.stack, snippet))
@ -1139,8 +1137,6 @@ class StackAttributesTest(common.HeatTestCase):
resource._register_class('GenericResourceType',
generic_rsrc.GenericResource)
resource._register_class('ResourceWithComplexAttributesType',
generic_rsrc.ResourceWithComplexAttributes)
self.m.ReplayAll()

View File

@ -98,7 +98,7 @@ template_attr = {
"properties": {
"count": 2,
"resource_def": {
"type": "dummyattr.resource",
"type": "ResourceWithComplexAttributesType",
"properties": {
}
}
@ -138,9 +138,6 @@ class ResourceGroupTest(common.HeatTestCase):
ResourceWithPropsAndId)
resource._register_class('dummy.listresource',
ResourceWithListProp)
AttributeResource = generic_resource.ResourceWithComplexAttributes
resource._register_class("dummyattr.resource",
AttributeResource)
self.m.StubOutWithMock(stackm.Stack, 'validate')
def test_assemble_nested(self):
@ -507,9 +504,6 @@ class ResourceGroupAttrTest(common.HeatTestCase):
super(ResourceGroupAttrTest, self).setUp()
resource._register_class("dummy.resource",
ResourceWithPropsAndId)
AttributeResource = generic_resource.ResourceWithComplexAttributes
resource._register_class("dummyattr.resource",
AttributeResource)
def test_aggregate_attribs(self):
"""