test_init_response_error() — langchain Function Reference
Architecture documentation for the test_init_response_error() function in test_chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 3fb2ba45_acd7_5877_0e32_f59502f789ee["test_init_response_error()"] 71dcb56e_a445_727d_c4bb_5dc733f24038["test_chat_models.py"] 3fb2ba45_acd7_5877_0e32_f59502f789ee -->|defined in| 71dcb56e_a445_727d_c4bb_5dc733f24038 style 3fb2ba45_acd7_5877_0e32_f59502f789ee fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/ollama/tests/integration_tests/chat_models/test_chat_models.py lines 52–58
def test_init_response_error(mock_list: MagicMock) -> None:
"""Test that a ResponseError is raised."""
mock_list.side_effect = ResponseError("Test response error")
with pytest.raises(ValidationError) as excinfo:
ChatOllama(model="any-model", validate_model_on_init=True)
assert "Received an error from the Ollama API" in str(excinfo.value)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_init_response_error() do?
test_init_response_error() is a function in the langchain codebase, defined in libs/partners/ollama/tests/integration_tests/chat_models/test_chat_models.py.
Where is test_init_response_error() defined?
test_init_response_error() is defined in libs/partners/ollama/tests/integration_tests/chat_models/test_chat_models.py at line 52.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free