diff --git a/lib/tool_shed/test/base/twilltestcase.py b/lib/tool_shed/test/base/twilltestcase.py index 9568aac837df..e7d32c23e153 100644 --- a/lib/tool_shed/test/base/twilltestcase.py +++ b/lib/tool_shed/test/base/twilltestcase.py @@ -1040,7 +1040,7 @@ def create_category(self, **kwd) -> Category: def create_repository_dependency( self, - repository: Optional[Repository] = None, + repository: Repository, repository_tuples=None, filepath=None, prior_installation_required=False, @@ -1050,7 +1050,6 @@ def create_repository_dependency( strings_displayed=None, strings_not_displayed=None, ): - assert repository repository_tuples = repository_tuples or [] repository_names = [] if complex: diff --git a/lib/tool_shed/test/functional/test_0300_reset_all_metadata.py b/lib/tool_shed/test/functional/test_0300_reset_all_metadata.py index f20c29b08cbd..e28d653c4c41 100644 --- a/lib/tool_shed/test/functional/test_0300_reset_all_metadata.py +++ b/lib/tool_shed/test/functional/test_0300_reset_all_metadata.py @@ -1,3 +1,5 @@ +from typing import Dict + from ..base.twilltestcase import ( common, ShedTwillTestCase, @@ -63,6 +65,7 @@ def test_0005_create_filtering_repository(self): owner=common.test_user_1_name, category=category_0000, ) + assert repository if self.repository_is_new(repository): running_standalone = True self.commit_tar_to_repository( @@ -90,6 +93,7 @@ def test_0010_create_freebayes_repository(self): strings_displayed=[], ) if running_standalone: + assert repository self.setup_freebayes_0010_repo(repository) def test_0015_create_datatypes_0020_repository(self): @@ -110,6 +114,7 @@ def test_0015_create_datatypes_0020_repository(self): category=category_0020, strings_displayed=[], ) + assert repository self.commit_tar_to_repository( repository, "column_maker/column_maker.tar", @@ -134,6 +139,7 @@ def test_0020_create_emboss_0020_repository(self): category=category_0020, strings_displayed=[], ) + assert repository self.commit_tar_to_repository( repository, "emboss/emboss.tar", @@ -158,6 +164,7 @@ def test_0025_create_emboss_datatypes_0030_repository(self): category=category_0030, strings_displayed=[], ) + assert column_maker_repository self.commit_tar_to_repository( column_maker_repository, "column_maker/column_maker.tar", @@ -182,6 +189,7 @@ def test_0030_create_emboss_5_repository(self): category=category_0030, strings_displayed=[], ) + assert emboss_5_repository self.commit_tar_to_repository( emboss_5_repository, "emboss/emboss.tar", @@ -206,6 +214,7 @@ def test_0035_create_emboss_6_repository(self): category=category_0030, strings_displayed=[], ) + assert emboss_6_repository self.commit_tar_to_repository( emboss_6_repository, "emboss/emboss.tar", @@ -230,6 +239,7 @@ def test_0040_create_emboss_0030_repository(self): category=category_0030, strings_displayed=[], ) + assert emboss_repository self.commit_tar_to_repository( emboss_repository, "emboss/emboss.tar", @@ -243,9 +253,13 @@ def test_0045_create_repository_dependencies_for_0030(self): column_maker_repository = self._get_repository_by_name_and_owner( "column_maker_0030", common.test_user_1_name ) + assert column_maker_repository emboss_repository = self._get_repository_by_name_and_owner("emboss_0030", common.test_user_1_name) + assert emboss_repository emboss_5_repository = self._get_repository_by_name_and_owner("emboss_5_0030", common.test_user_1_name) + assert emboss_5_repository emboss_6_repository = self._get_repository_by_name_and_owner("emboss_6_0030", common.test_user_1_name) + assert emboss_6_repository repository_dependencies_path = self.generate_temp_path("test_0330", additional_paths=["emboss"]) column_maker_tuple = ( self.url, @@ -299,6 +313,7 @@ def test_0050_create_freebayes_repository(self): category=category_0040, strings_displayed=[], ) + assert repository if running_standalone: self.commit_tar_to_repository( repository, @@ -324,6 +339,7 @@ def test_0055_create_filtering_repository(self): category=category_0040, strings_displayed=[], ) + assert repository self.commit_tar_to_repository( repository, "filtering/filtering_1.1.0.tar", @@ -335,7 +351,9 @@ def test_0060_create_dependency_structure(self): global running_standalone if running_standalone: freebayes_repository = self._get_repository_by_name_and_owner("freebayes_0040", common.test_user_1_name) + assert freebayes_repository filtering_repository = self._get_repository_by_name_and_owner("filtering_0040", common.test_user_1_name) + assert filtering_repository repository_dependencies_path = self.generate_temp_path("test_0340", additional_paths=["dependencies"]) freebayes_tuple = ( self.url, @@ -375,6 +393,7 @@ def test_0065_create_convert_repository(self): category=category, strings_displayed=[], ) + assert repository self.commit_tar_to_repository( repository, "convert_chars/convert_chars.tar", @@ -396,6 +415,7 @@ def test_0070_create_column_repository(self): category=category, strings_displayed=[], ) + assert repository self.commit_tar_to_repository( repository, "column_maker/column_maker.tar", @@ -420,6 +440,7 @@ def test_0080_create_emboss_repository(self): category=category, strings_displayed=[], ) + assert repository self.commit_tar_to_repository( repository, "emboss/emboss.tar", @@ -441,6 +462,7 @@ def test_0085_create_filtering_repository(self): category=category, strings_displayed=[], ) + assert filtering_repository self.commit_tar_to_repository( filtering_repository, "filtering/filtering_1.1.0.tar", @@ -462,6 +484,7 @@ def test_0090_create_freebayes_repository(self): category=category, strings_displayed=[], ) + assert repository self.commit_tar_to_repository( repository, "freebayes/freebayes.tar", @@ -483,6 +506,7 @@ def test_0095_create_bismark_repository(self): category=category, strings_displayed=[], ) + assert repository self.user_populator().setup_bismark_repo(repository, end=1) def test_0100_create_and_upload_dependency_definitions(self): @@ -491,19 +515,25 @@ def test_0100_create_and_upload_dependency_definitions(self): if running_standalone: self.login(email=common.test_user_1_email, username=common.test_user_1_name) column_repository = self._get_repository_by_name_and_owner(column_repository_name, common.test_user_1_name) + assert column_repository convert_repository = self._get_repository_by_name_and_owner( convert_repository_name, common.test_user_1_name ) + assert convert_repository emboss_repository = self._get_repository_by_name_and_owner(emboss_repository_name, common.test_user_1_name) + assert emboss_repository filtering_repository = self._get_repository_by_name_and_owner( filtering_repository_name, common.test_user_1_name ) + assert filtering_repository freebayes_repository = self._get_repository_by_name_and_owner( freebayes_repository_name, common.test_user_1_name ) + assert freebayes_repository bismark_repository = self._get_repository_by_name_and_owner( bismark_repository_name, common.test_user_1_name ) + assert bismark_repository dependency_xml_path = self.generate_temp_path("test_0050", additional_paths=["freebayes"]) # convert_chars depends on column_maker # column_maker depends on convert_chars @@ -562,8 +592,8 @@ def test_0100_create_and_upload_dependency_definitions(self): def test_0110_reset_metadata_on_all_repositories(self): """Reset metadata on all repositories, then verify that it has not changed.""" self.login(email=common.admin_email, username=common.admin_username) - old_metadata = dict() - new_metadata = dict() + old_metadata: Dict[str, Dict] = dict() + new_metadata: Dict[str, Dict] = dict() repositories = self.test_db_util.get_all_repositories() for repository in repositories: old_metadata[self.security.encode_id(repository.id)] = dict()