diff --git a/core/tests/routes/plugins/test_plugin_toggle.py b/core/tests/routes/plugins/test_plugin_toggle.py index 73b62f25..13074517 100644 --- a/core/tests/routes/plugins/test_plugin_toggle.py +++ b/core/tests/routes/plugins/test_plugin_toggle.py @@ -30,8 +30,10 @@ def test_deactivate_plugin(client, just_installed_plugin): # tool has been taken away tools = get_embedded_tools(client) + assert len(tools) == 1 tool_names = list(map(lambda t: t["metadata"]["name"], tools)) - assert not "mock_tool" in tool_names + assert "mock_tool" not in tool_names + assert "get_the_time" in tool_names # from core_plugin def test_reactivate_plugin(client, just_installed_plugin): @@ -55,5 +57,7 @@ def test_reactivate_plugin(client, just_installed_plugin): # tool has been re-embedded tools = get_embedded_tools(client) + assert len(tools) == 2 tool_names = list(map(lambda t: t["metadata"]["name"], tools)) - assert "mock_tool" in tool_names \ No newline at end of file + assert "mock_tool" in tool_names + assert "get_the_time" in tool_names # from core_plugin \ No newline at end of file diff --git a/core/tests/routes/plugins/test_plugins_install_uninstall.py b/core/tests/routes/plugins/test_plugins_install_uninstall.py index cd53b110..ca2d5874 100644 --- a/core/tests/routes/plugins/test_plugins_install_uninstall.py +++ b/core/tests/routes/plugins/test_plugins_install_uninstall.py @@ -26,10 +26,12 @@ def test_plugin_install_upload_zip(client, just_installed_plugin): # plugin has been actually extracted in (mock) plugins folder assert os.path.exists(mock_plugin_final_folder) - # check whether new tools have been embedded + # check whether new tool has been embedded tools = get_embedded_tools(client) + assert len(tools) == 2 tool_names = list(map(lambda t: t["metadata"]["name"], tools)) assert "mock_tool" in tool_names + assert "get_the_time" in tool_names # from core_plugin def test_plugin_uninstall(client, just_installed_plugin): @@ -49,5 +51,7 @@ def test_plugin_uninstall(client, just_installed_plugin): # plugin tool disappeared tools = get_embedded_tools(client) + assert len(tools) == 1 tool_names = list(map(lambda t: t["metadata"]["name"], tools)) assert "mock_tool" not in tool_names + assert "get_the_time" in tool_names # from core_plugin