補上 RAG hit logger 回歸測試
This commit is contained in:
@@ -144,6 +144,17 @@ def test_context_manager_set_error_without_raise(reset_state):
|
||||
assert 'timeout' in rec['error']
|
||||
|
||||
|
||||
def test_context_manager_marks_rag_hit(reset_state):
|
||||
captured = reset_state
|
||||
with log_ai_call('openclaw_qa', 'gcp_ollama', 'qwen3:14b') as ctx:
|
||||
ctx.set_rag_hit(True)
|
||||
|
||||
assert _wait_for_async(captured, 1)
|
||||
rec = captured[0]
|
||||
assert rec['status'] == 'ok'
|
||||
assert rec['rag_hit'] is True
|
||||
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# decorator 測試
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user