mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-31 22:57:14 +00:00
fix(plugin): return not found after removal (#2483)
Co-authored-by: Hyu <chenhyu@proton.me>
This commit is contained in:
@@ -640,6 +640,19 @@ class TestGetPluginInfo:
|
||||
connector.handler.get_plugin_info.assert_called_once_with('author', 'plugin')
|
||||
assert result == {'manifest': {'metadata': {'name': 'plugin'}}}
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_returns_none_when_plugin_is_not_installed(self):
|
||||
connector = create_mock_connector()
|
||||
configure_handler(connector, AsyncMock())
|
||||
connector._target_binding = AsyncMock(
|
||||
side_effect=ValueError('Plugin author/plugin is not installed in this Workspace')
|
||||
)
|
||||
|
||||
result = await connector.get_plugin_info('author', 'plugin')
|
||||
|
||||
assert result is None
|
||||
connector.handler.get_plugin_info.assert_not_awaited()
|
||||
|
||||
|
||||
class TestSetPluginConfig:
|
||||
"""Tests for set_plugin_config method."""
|
||||
|
||||
Reference in New Issue
Block a user