Home / Function/ test_anthropic_uses_actual_secret_value_from_secretstr() — langchain Function Reference

test_anthropic_uses_actual_secret_value_from_secretstr() — langchain Function Reference

Architecture documentation for the test_anthropic_uses_actual_secret_value_from_secretstr() function in test_chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ce99cb45_8ffe_5fd5_248e_e6ca7f0ad815["test_anthropic_uses_actual_secret_value_from_secretstr()"]
  18428dc5_a41b_90c6_88ad_615296ee3311["test_chat_models.py"]
  ce99cb45_8ffe_5fd5_248e_e6ca7f0ad815 -->|defined in| 18428dc5_a41b_90c6_88ad_615296ee3311
  style ce99cb45_8ffe_5fd5_248e_e6ca7f0ad815 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/anthropic/tests/unit_tests/test_chat_models.py lines 1255–1264

def test_anthropic_uses_actual_secret_value_from_secretstr() -> None:
    """Test that the actual secret value is correctly retrieved."""
    chat_model = ChatAnthropic(  # type: ignore[call-arg, call-arg]
        model=MODEL_NAME,
        anthropic_api_key="secret-api-key",
    )
    assert (
        cast("SecretStr", chat_model.anthropic_api_key).get_secret_value()
        == "secret-api-key"
    )

Domain

Subdomains

Frequently Asked Questions

What does test_anthropic_uses_actual_secret_value_from_secretstr() do?
test_anthropic_uses_actual_secret_value_from_secretstr() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/test_chat_models.py.
Where is test_anthropic_uses_actual_secret_value_from_secretstr() defined?
test_anthropic_uses_actual_secret_value_from_secretstr() is defined in libs/partners/anthropic/tests/unit_tests/test_chat_models.py at line 1255.

Analyze Your Own Codebase

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

Try Supermodel Free