'Update a stack using the same template.'

def test_stack_update_existing_template(self):

    stack_name = 'service_update_test_stack_existing_template'
    api_args = {rpc_api.PARAM_TIMEOUT: 60, rpc_api.PARAM_EXISTING: True}
    t = template_format.parse(tools.wp_template)
    self.man.thread_group_mgr = tools.DummyThreadGroupMgrLogStart()
    params = {}
    stack = utils.parse_stack(t, stack_name=stack_name, params=params)
    stack.set_stack_user_project_id('1234')
    self.assertEqual(t, stack.t.t)
    stack.action = stack.CREATE
    stack.status = stack.COMPLETE
    with mock.patch('heat.engine.stack.Stack') as mock_stack:
        mock_stack.load.return_value = stack
        mock_stack.validate.return_value = None
        result = self.man.update_stack(self.ctx, stack.identifier(), None, params, None, api_args)
        tmpl = mock_stack.call_args[0][2]
        self.assertEqual(t, tmpl.t)
        self.assertEqual(stack.identifier(), result)
        self.assertEqual(1, len(self.man.thread_group_mgr.started))
