def test_resource_multi_required_by(self):
    tmpl = {'HeatTemplateFormatVersion': '2012-12-12', 'Resources': {'AResource': {'Type': 'GenericResourceType'}, 'BResource': {'Type': 'GenericResourceType'}, 'CResource': {'Type': 'GenericResourceType'}, 'DResource': {'Type': 'GenericResourceType', 'DependsOn': ['AResource', 'BResource', 'CResource']}}}
    self.stack = stack.Stack(self.ctx, 'depends_test_stack', template.Template(tmpl))
    self.stack.store()
    self.stack.create()
    self.assertEqual((stack.Stack.CREATE, stack.Stack.COMPLETE), self.stack.state)
    for r in ['AResource', 'BResource', 'CResource']:
        self.assertEqual(['DResource'], self.stack[r].required_by())
def test_resource_multi_required_by(self):
    tmpl = {'HeatTemplateFormatVersion': '2012-12-12', 'Resources': {'AResource': {'Type': 'GenericResourceType'}, 'BResource': {'Type': 'GenericResourceType'}, 'CResource': {'Type': 'GenericResourceType'}, 'DResource': {'Type': 'GenericResourceType', 'DependsOn': ['AResource', 'BResource', 'CResource']}}}
    self.stack = stack.Stack(self.ctx, 'depends_test_stack', template.Template(tmpl))
    self.stack.store()
    self.stack.create()
    self.assertEqual((stack.Stack.CREATE, stack.Stack.COMPLETE), self.stack.state)
    for r in ['AResource', 'BResource', 'CResource']:
        self.assertEqual(['DResource'], self.stack[r].required_by())