def _get_stack_to_check(self, name):
    tpl = {'HeatTemplateFormatVersion': '2012-12-12', 'Resources': {'A': {'Type': 'GenericResourceType'}, 'B': {'Type': 'GenericResourceType'}}}
    self.stack = stack.Stack(self.ctx, name, template.Template(tpl), status_reason=name)
    self.stack.store()

    def _mock_check(res):
        res.handle_check = mock.Mock()
    [_mock_check(res) for res in self.stack.resources.values()]
    return self.stack
def _get_stack_to_check(self, name):
    tpl = {'HeatTemplateFormatVersion': '2012-12-12', 'Resources': {'A': {'Type': 'GenericResourceType'}, 'B': {'Type': 'GenericResourceType'}}}
    self.stack = stack.Stack(self.ctx, name, template.Template(tpl), status_reason=name)
    self.stack.store()

    def _mock_check(res):
        res.handle_check = mock.Mock()
    [_mock_check(res) for res in self.stack.resources.values()]
    return self.stack