2026-04-01 22:24:14 +00:00
|
|
|
"""
|
|
|
|
|
Shared pytest fixtures for llm-connect tests.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
|
from llm_connect.adapter import MockLLMAdapter
|
2026-09-27 17:36:27 +02:00
|
|
|
from llm_connect.models import LLMResponse, RunConfig
|
2026-04-01 22:24:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
|
def run_config():
|
|
|
|
|
"""Default RunConfig for tests."""
|
|
|
|
|
return RunConfig()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
|
def mock_adapter():
|
|
|
|
|
"""MockLLMAdapter with a predictable response."""
|
|
|
|
|
return MockLLMAdapter(mock_response="test response")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
|
def sample_response():
|
|
|
|
|
"""A minimal valid LLMResponse."""
|
|
|
|
|
return LLMResponse(content="hello", model="test-model")
|