-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
43 lines (37 loc) · 1.04 KB
/
Copy pathconftest.py
File metadata and controls
43 lines (37 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"""
Shared test fixtures and utilities
"""
import pytest
from unittest.mock import AsyncMock, MagicMock
class MockLLMProvider:
"""Mock LLM provider for testing without API keys"""
async def generate(self, prompt: str) -> str:
"""Mock LLM generation"""
return '{"action": "test", "output": "mock response from LLM"}'
async def analyze(self, text: str) -> dict:
"""Mock analysis"""
return {
"confidence": 0.9,
"category": "test",
"intent": "code_generation"
}
@pytest.fixture
def mock_llm_config():
"""Configuration with mock LLM"""
return {
'openspace': {
'registry_path': './test_data/skills',
},
'openhands': {
'model': 'mock-gpt-4',
'api_key': 'test-key',
'provider': 'mock', # Add provider type
},
'monitor': {
'quality_threshold': 0.8,
'enable_alerts': False,
},
'governance': {
'enabled': True,
}
}