27 lines
558 B
Python
27 lines
558 B
Python
|
|
"""
|
||
|
|
Shared pytest fixtures for llm-connect tests.
|
||
|
|
"""
|
||
|
|
|
||
|
|
import pytest
|
||
|
|
|
||
|
|
from llm_connect.models import RunConfig, LLMResponse
|
||
|
|
from llm_connect.adapter import MockLLMAdapter
|
||
|
|
|
||
|
|
|
||
|
|
@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")
|