Home / Function/ test_azure_serialized_secrets() — langchain Function Reference

test_azure_serialized_secrets() — langchain Function Reference

Architecture documentation for the test_azure_serialized_secrets() function in test_secrets.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  771141fe_3fd3_ff3a_9522_3c7932a8f507["test_azure_serialized_secrets()"]
  654b0dc2_a4de_700d_ff97_c27a5220678d["test_secrets.py"]
  771141fe_3fd3_ff3a_9522_3c7932a8f507 -->|defined in| 654b0dc2_a4de_700d_ff97_c27a5220678d
  style 771141fe_3fd3_ff3a_9522_3c7932a8f507 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/openai/tests/unit_tests/test_secrets.py lines 203–215

def test_azure_serialized_secrets(model_class: type) -> None:
    """Test that the actual secret value is correctly retrieved."""
    model = model_class(
        openai_api_key="secret-api-key", api_version="foo", azure_endpoint="foo"
    )
    serialized = dumpd(model)
    assert serialized["kwargs"]["openai_api_key"]["id"] == ["AZURE_OPENAI_API_KEY"]

    model = model_class(
        azure_ad_token=AZURE_AD_TOKEN, api_version="foo", azure_endpoint="foo"
    )
    serialized = dumpd(model)
    assert serialized["kwargs"]["azure_ad_token"]["id"] == ["AZURE_OPENAI_AD_TOKEN"]

Domain

Subdomains

Frequently Asked Questions

What does test_azure_serialized_secrets() do?
test_azure_serialized_secrets() is a function in the langchain codebase, defined in libs/partners/openai/tests/unit_tests/test_secrets.py.
Where is test_azure_serialized_secrets() defined?
test_azure_serialized_secrets() is defined in libs/partners/openai/tests/unit_tests/test_secrets.py at line 203.

Analyze Your Own Codebase

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

Try Supermodel Free