test_ollama_embeddings_url_auth_integration() — langchain Function Reference
Architecture documentation for the test_ollama_embeddings_url_auth_integration() function in test_auth.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD dc3c0bfc_e97f_248f_9716_b8a755dcb2ee["test_ollama_embeddings_url_auth_integration()"] c4a6750f_a08b_199c_5b28_04df3d804c98["TestOllamaEmbeddingsUrlAuth"] dc3c0bfc_e97f_248f_9716_b8a755dcb2ee -->|defined in| c4a6750f_a08b_199c_5b28_04df3d804c98 style dc3c0bfc_e97f_248f_9716_b8a755dcb2ee fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/ollama/tests/unit_tests/test_auth.py lines 176–194
def test_ollama_embeddings_url_auth_integration(
self, mock_async_client: MagicMock, mock_client: MagicMock
) -> None:
"""Test that OllamaEmbeddings properly handles URL authentication."""
url_with_auth = "https://user:password@ollama.example.com:11434"
OllamaEmbeddings(
model=MODEL_NAME,
base_url=url_with_auth,
)
expected_url = "https://ollama.example.com:11434"
expected_credentials = base64.b64encode(b"user:password").decode()
expected_headers = {"Authorization": f"Basic {expected_credentials}"}
mock_client.assert_called_once_with(host=expected_url, headers=expected_headers)
mock_async_client.assert_called_once_with(
host=expected_url, headers=expected_headers
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_ollama_embeddings_url_auth_integration() do?
test_ollama_embeddings_url_auth_integration() is a function in the langchain codebase, defined in libs/partners/ollama/tests/unit_tests/test_auth.py.
Where is test_ollama_embeddings_url_auth_integration() defined?
test_ollama_embeddings_url_auth_integration() is defined in libs/partners/ollama/tests/unit_tests/test_auth.py at line 176.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free