From 5eb268ae8371a3f6903e2c288c0cd28362eb6ba5 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Fri, 29 Sep 2023 11:37:59 -0500 Subject: [PATCH] fix api and integration tests (for removed `panel_labels`) --- lib/galaxy_test/api/test_tools.py | 2 +- test/integration/test_panel_views.py | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/galaxy_test/api/test_tools.py b/lib/galaxy_test/api/test_tools.py index 3f5a360944b..11649b1a966 100644 --- a/lib/galaxy_test/api/test_tools.py +++ b/lib/galaxy_test/api/test_tools.py @@ -2646,7 +2646,7 @@ class TestToolsApi(ApiTestCase, TestsTools): tool_ids = [] for id, tool_or_section in tools_index.items(): if "tools" in tool_or_section: - tool_ids.extend(tool_or_section["tools"]) + tool_ids.extend([t for t in tool_or_section["tools"] if isinstance(t, str)]) else: tool_ids.append(id) diff --git a/test/integration/test_panel_views.py b/test/integration/test_panel_views.py index e3d96222cd1..91a3ce82e14 100644 --- a/test/integration/test_panel_views.py +++ b/test/integration/test_panel_views.py @@ -59,9 +59,12 @@ class TestPanelViewsFromDirectoryIntegration(integration_util.IntegrationTestCas section = list(index_panel.values())[0] section_elems = section["tools"] assert len(section_elems) == 4 - assert section_elems == ["panel_label_the-start", "empty_list", "panel_label_the-middle", "count_list"] - section_labels = section["panel_labels"] - assert len(section_labels) == 2 + assert [section_elems[1], section_elems[3]] == ["empty_list", "count_list"] + assert [section_elems[0]["id"], section_elems[2]["id"]] == ["the-start", "the-middle"] + assert [section_elems[0]["model_class"], section_elems[2]["model_class"]] == [ + "ToolSectionLabel", + "ToolSectionLabel", + ] def test_section_embed(self): index = self.galaxy_interactor.get("tools", data=dict(in_panel=True, view="custom_5")) @@ -78,7 +81,7 @@ class TestPanelViewsFromDirectoryIntegration(integration_util.IntegrationTestCas assert len(section_elems) == 5 assert section_elems[0:3] == ["multi_data_optional", "paths_as_file", "param_text_option"] assert section_elems[4] == "Filter1" - assert len(section["panel_labels"]) == 1 + assert section_elems[3]["model_class"] == "ToolSectionLabel" def test_section_reference_by_name(self): index = self.galaxy_interactor.get("tools", data=dict(in_panel=True, view="custom_8"))