From 5a90f2d76ed0c02c3f2c119b41675dfed16b748e Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Tue, 24 Oct 2023 11:15:49 +0100 Subject: [PATCH] Fix `get_metadata()` method call Fix the following mypy error: ``` lib/tool_shed/test/functional/test_0000_basic_repository_features.py:303: error: Item "None" of "ToolShedPopulator | None" has no attribute "get_metadata" [union-attr] metadata = self._populator.get_metadata(repository, downloadable_only=False) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` --- .../test/functional/test_0000_basic_repository_features.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tool_shed/test/functional/test_0000_basic_repository_features.py b/lib/tool_shed/test/functional/test_0000_basic_repository_features.py index fc3ab43623e2..e323187267a6 100644 --- a/lib/tool_shed/test/functional/test_0000_basic_repository_features.py +++ b/lib/tool_shed/test/functional/test_0000_basic_repository_features.py @@ -300,7 +300,7 @@ def test_0110_delete_filtering_repository(self): repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) self.login(email=common.admin_email, username=common.admin_username) self.delete_repository(repository) - metadata = self._populator.get_metadata(repository, downloadable_only=False) + metadata = self.populator.get_metadata(repository, downloadable_only=False) for _, value in metadata.__root__.items(): assert not value.downloadable # Explicitly reload all metadata revisions from the database, to ensure that we have the current status of the downloadable flag.