langchain/libs/standard-tests/tests/unit_tests
Andrew Wason 22aa5e07ed
standard-tests: Fix ToolsIntegrationTests to correctly handle "content_and_artifact" tools (#29391)
**Description:**

The response from `tool.invoke()` is always a ToolMessage, with content
and artifact fields, not a tuple.
The tuple is converted to a ToolMessage here

b6ae7ca91d/libs/core/langchain_core/tools/base.py (L726)

**Issue:**

Currently `ToolsIntegrationTests` requires `invoke()` to return a tuple
and so standard tests fail for "content_and_artifact" tools. This fixes
that to check the returned ToolMessage.

This PR also adds a test that now passes.
2025-02-05 21:27:09 -05:00
..
__init__.py standard-tests[minor]: Add standard read write test suite for vectorstores (#23355) 2024-06-24 19:40:56 +00:00
custom_chat_model.py docs: poetry publish 2 (#28277) 2024-11-21 20:49:38 -08:00
test_basic_retriever.py core, tests: more tolerant _aget_relevant_documents function (#28462) 2024-12-06 00:49:30 +00:00
test_basic_tool.py standard-tests: Fix ToolsIntegrationTests to correctly handle "content_and_artifact" tools (#29391) 2025-02-05 21:27:09 -05:00
test_custom_chat_model.py docs: poetry publish 2 (#28277) 2024-11-21 20:49:38 -08:00
test_decorated_tool.py standard-tests: fix decorator init test (#28246) 2024-11-21 03:35:43 +00:00
test_embeddings.py tests[patch]: run standard tests for embeddings and populate embeddings API ref (#28545) 2024-12-05 19:39:03 +00:00
test_in_memory_base_store.py standard-tests: rename langchain_standard_tests to langchain_tests, release 0.3.2 (#28203) 2024-11-18 19:10:39 -08:00
test_in_memory_cache.py standard-tests: rename langchain_standard_tests to langchain_tests, release 0.3.2 (#28203) 2024-11-18 19:10:39 -08:00
test_in_memory_vectorstore.py multiple: combine sync/async vector store standard test suites (#28580) 2024-12-06 14:55:06 -05:00