Fix test_uninstall_outside_section unit test

This commit is contained in:
Nicola Soranzo
2021-01-16 06:38:19 +00:00
parent 452aba9ee3
commit 6df51858e0
@@ -135,15 +135,10 @@ class ToolPanelManagerTestCase(BaseToolBoxTestCase):
all_versions = new_toolbox.get_tool("test_tool", get_all_versions=True)
assert not all_versions
# Check that tool panel has reverted to old value...
section = new_toolbox._tool_panel["tid"]
assert len(section.elems) == 0
def _setup_two_versions_remove_one(self, section, uninstall):
self._init_tool()
self._setup_two_versions_in_config(section=True)
self._setup_two_versions_in_config(section=section)
self._setup_two_versions()
self.toolbox
self._remove_repository_contents("github.com/galaxyproject/example/test_tool/0.2", uninstall=uninstall)
def _verify_version_2_removed_from_panel(self, section=True):
@@ -161,7 +156,7 @@ class ToolPanelManagerTestCase(BaseToolBoxTestCase):
assert "github.com/galaxyproject/example/test_tool/0.2" not in new_toolbox._integrated_tool_panel["tid"].elems
else:
assert next(iter(self.toolbox._tool_panel.values())).id == "github.com/galaxyproject/example/test_tool/0.1"
assert next(iter(new_toolbox._tool_panel.values())).id == "github.com/galaxyproject/example/test_tool/0.1"
assert "github.com/galaxyproject/example/test_tool/0.2" not in new_toolbox._integrated_tool_panel
def _remove_repository_contents(self, guid, uninstall, shed_tool_conf="tool_conf.xml"):