'Test the resource with nested stack should need update.
The resource in Create or Update state and has nested stack, should
need update.'

def test_need_update_for_nested_resource(self):

    self.parent_resource.action = self.parent_resource.CREATE
    self.parent_resource._rpc_client = mock.MagicMock()
    self.parent_resource._rpc_client.show_stack.return_value = [{'stack_action': self.parent_resource.CREATE, 'stack_status': self.parent_resource.COMPLETE}]
    need_update = self.parent_resource._needs_update(self.parent_resource.t, self.parent_resource.t, self.parent_resource.properties, self.parent_resource.properties, self.parent_resource)
    self.assertTrue(need_update)
