Home / Function/ test_azure_openai_uses_actual_secret_value_from_secretstr() — langchain Function Reference

test_azure_openai_uses_actual_secret_value_from_secretstr() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/partners/openai/tests/unit_tests/test_secrets.py lines 137–148

def test_azure_openai_uses_actual_secret_value_from_secretstr(
    model_class: type,
) -> None:
    """Test that the actual secret value is correctly retrieved."""
    model = model_class(
        openai_api_key="secret-api-key",
        azure_endpoint="endpoint",
        azure_ad_token=AZURE_AD_TOKEN,
        api_version="version",
    )
    assert cast(SecretStr, model.openai_api_key).get_secret_value() == "secret-api-key"
    assert cast(SecretStr, model.azure_ad_token).get_secret_value() == AZURE_AD_TOKEN

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free