test(acceptance): align fixtures with accepted runtime contracts

This commit is contained in:
RockChinQ
2026-10-09 16:48:15 +00:00
parent 6175e30210
commit 9c4d383bb0
14 changed files with 65 additions and 55 deletions
@@ -105,6 +105,7 @@ async def test_runtime_error_redacts_persisted_secrets_on_partial_update():
from langbot.pkg.api.http.service.bot_errors import BotApplyError
ap = SimpleNamespace(
sess_mgr=SimpleNamespace(session_list=[]),
persistence_mgr=SimpleNamespace(execute_async=AsyncMock(return_value=SimpleNamespace(rowcount=1))),
platform_mgr=SimpleNamespace(
remove_bot=AsyncMock(),
@@ -113,7 +114,7 @@ async def test_runtime_error_redacts_persisted_secrets_on_partial_update():
)
service = BotService(ap)
service.get_bot = AsyncMock(
return_value={'uuid': 'bot-1', 'adapter_config': {'app_secret': 'persisted-secret-value'}}
return_value={'uuid': 'bot-1', 'enable': True, 'adapter_config': {'app_secret': 'persisted-secret-value'}}
)
with pytest.raises(BotApplyError) as captured:
await service.update_bot('workspace-test', 'bot-1', {'enable': True})