mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-09 12:40:59 +00:00
chore(merge): sync master into dev/4.11.x
This commit is contained in:
@@ -5,6 +5,7 @@ from unittest.mock import AsyncMock, Mock
|
||||
|
||||
import pytest
|
||||
|
||||
from langbot.pkg.api.http.context import ExecutionContext
|
||||
from langbot.pkg.api.http.service.monitoring import MonitoringService
|
||||
|
||||
|
||||
@@ -34,6 +35,11 @@ async def test_record_tool_call_uses_full_monitoring_message_row_for_context():
|
||||
service = MonitoringService(SimpleNamespace(persistence_mgr=persistence_mgr))
|
||||
|
||||
await service.record_tool_call(
|
||||
ExecutionContext(
|
||||
instance_uuid='instance-test',
|
||||
workspace_uuid='workspace-test',
|
||||
placement_generation=1,
|
||||
),
|
||||
tool_name='exec',
|
||||
tool_source='native',
|
||||
duration=12,
|
||||
@@ -42,6 +48,7 @@ async def test_record_tool_call_uses_full_monitoring_message_row_for_context():
|
||||
|
||||
insert_statement = persistence_mgr.execute_async.await_args_list[1].args[0]
|
||||
values = insert_statement.compile().params
|
||||
assert values['workspace_uuid'] == 'workspace-test'
|
||||
assert values['bot_id'] == 'bot-1'
|
||||
assert values['pipeline_id'] == 'pipeline-1'
|
||||
assert values['session_id'] == 'person_1'
|
||||
|
||||
Reference in New Issue
Block a user