Home / Function/ test_get_with_missing_ids() — langchain Function Reference

test_get_with_missing_ids() — langchain Function Reference

Architecture documentation for the test_get_with_missing_ids() function in indexer.py from the langchain codebase.

Function python LangChainCore Runnables calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  0662580e_d4ff_5584_1da0_95133158bf88["test_get_with_missing_ids()"]
  67ebaa9c_263d_69d9_3a75_de0b0ac61588["DocumentIndexerTestSuite"]
  0662580e_d4ff_5584_1da0_95133158bf88 -->|defined in| 67ebaa9c_263d_69d9_3a75_de0b0ac61588
  79d3f412_6896_e250_00c2_f9323e7aa199["test_get_with_missing_ids()"]
  79d3f412_6896_e250_00c2_f9323e7aa199 -->|calls| 0662580e_d4ff_5584_1da0_95133158bf88
  79d3f412_6896_e250_00c2_f9323e7aa199["test_get_with_missing_ids()"]
  0662580e_d4ff_5584_1da0_95133158bf88 -->|calls| 79d3f412_6896_e250_00c2_f9323e7aa199
  style 0662580e_d4ff_5584_1da0_95133158bf88 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/standard-tests/langchain_tests/integration_tests/indexer.py lines 184–200

    def test_get_with_missing_ids(self, index: DocumentIndex) -> None:
        """Test get with missing IDs."""
        documents = [
            Document(id="1", page_content="foo", metadata={"id": 1}),
            Document(id="2", page_content="bar", metadata={"id": 2}),
        ]
        upsert_response = index.upsert(documents)
        assert upsert_response == {
            "succeeded": ["1", "2"],
            "failed": [],
        }
        retrieved_documents = index.get(["1", "2", "3", "4"])
        # The ordering is not guaranteed, so we use a set.
        assert sorted(retrieved_documents, key=lambda x: x.id or "") == [
            Document(page_content="foo", metadata={"id": 1}, id="1"),
            Document(page_content="bar", metadata={"id": 2}, id="2"),
        ]

Domain

Subdomains

Frequently Asked Questions

What does test_get_with_missing_ids() do?
test_get_with_missing_ids() is a function in the langchain codebase, defined in libs/standard-tests/langchain_tests/integration_tests/indexer.py.
Where is test_get_with_missing_ids() defined?
test_get_with_missing_ids() is defined in libs/standard-tests/langchain_tests/integration_tests/indexer.py at line 184.
What does test_get_with_missing_ids() call?
test_get_with_missing_ids() calls 1 function(s): test_get_with_missing_ids.
What calls test_get_with_missing_ids()?
test_get_with_missing_ids() is called by 1 function(s): test_get_with_missing_ids.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free