mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-11-01 21:35:25 +08:00
test(acceptance): align fixtures with accepted runtime contracts
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user