From 126df89da4c233e3a88ea391c70e42b52fd76cd1 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Mon, 23 Oct 2023 17:05:31 +0100 Subject: [PATCH] Fix type annotation of `test_0010_repository_with_tool_dependencies.py` --- .../test_0010_repository_with_tool_dependencies.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/tool_shed/test/functional/test_0010_repository_with_tool_dependencies.py b/lib/tool_shed/test/functional/test_0010_repository_with_tool_dependencies.py index 4b9d27ae19d7..d6f2e06e0b13 100644 --- a/lib/tool_shed/test/functional/test_0010_repository_with_tool_dependencies.py +++ b/lib/tool_shed/test/functional/test_0010_repository_with_tool_dependencies.py @@ -1,10 +1,8 @@ import os +from ..base import common from ..base.api import skip_if_api_v2 -from ..base.twilltestcase import ( - common, - ShedTwillTestCase, -) +from ..base.twilltestcase import ShedTwillTestCase repository_name = "freebayes_0010" repository_description = "Galaxy's freebayes tool" @@ -45,6 +43,7 @@ def test_0010_create_freebayes_repository_and_upload_tool_xml(self): """ self.login(email=common.test_user_1_email, username=common.test_user_1_name) category = self.populator.get_category_with_name("Test 0010 Repository With Tool Dependencies") + assert category repository = self.get_or_create_repository( name=repository_name, description=repository_description, @@ -73,6 +72,7 @@ def test_0015_upload_missing_tool_data_table_conf_file(self): Uploading the tool_data_table_conf.xml.sample alone should not make the tool valid, but the error message should change. """ repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) + assert repository strings_displayed = ["Upload a file named sam_fa_indices.loc.sample"] self.add_file_to_repository( repository, "freebayes/tool_data_table_conf.xml.sample", strings_displayed=strings_displayed @@ -91,6 +91,7 @@ def test_0020_upload_missing_sample_loc_file(self): Uploading the tool_data_table_conf.xml.sample alone should not make the tool valid, but the error message should change. """ repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) + assert repository self.add_file_to_repository(repository, "freebayes/sam_fa_indices.loc.sample") def test_0025_upload_malformed_tool_dependency_xml(self): @@ -100,6 +101,7 @@ def test_0025_upload_malformed_tool_dependency_xml(self): Upload a tool_dependencies.xml file that contains <> in the text of the readme tag. This should show an error message about malformed xml. """ repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) + assert repository target = os.path.join("freebayes", "malformed_tool_dependencies", "tool_dependencies.xml") self.add_file_to_repository( repository, target, strings_displayed=["Exception attempting to parse", "invalid element name"] @@ -112,6 +114,7 @@ def test_0030_upload_invalid_tool_dependency_xml(self): This should result in a message about the tool dependency configuration not matching the tool's requirements. """ repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) + assert repository target = os.path.join("freebayes", "invalid_tool_dependencies", "tool_dependencies.xml") strings_displayed = [ "The settings for name, version and type from a contained tool configuration" @@ -125,6 +128,7 @@ def test_0035_upload_valid_tool_dependency_xml(self): At this stage, there should be no errors on the upload page, as every missing or invalid file has been corrected. """ repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) + assert repository target = os.path.join("freebayes", "tool_dependencies.xml") self.add_file_to_repository(repository, target) @@ -136,6 +140,7 @@ def test_0040_verify_tool_dependencies(self): Verify that the manage repository page now displays the valid tool dependencies, and that there are no invalid tools shown on the manage page. """ repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) + assert repository strings_displayed = ["freebayes", "0.9.4_9696d0ce8a9", "samtools", "0.1.18", "Valid tools", "package"] strings_not_displayed = [self.invalid_tools_labels] self.display_manage_repository_page(