From 785cfce3fae70a40bb287656151fcdf687515809 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 13 Apr 2020 23:03:22 +0200 Subject: [PATCH] Fix unit tests --- lib/galaxy/tool_shed/tools/tool_validator.py | 1 + test/unit/tools_support.py | 1 + test/unit/workflows/test_modules.py | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tool_shed/tools/tool_validator.py b/lib/galaxy/tool_shed/tools/tool_validator.py index e98ae396679..495bb277d0f 100644 --- a/lib/galaxy/tool_shed/tools/tool_validator.py +++ b/lib/galaxy/tool_shed/tools/tool_validator.py @@ -78,6 +78,7 @@ class ToolValidator(object): ) try: tool = create_tool_from_source(config_file=full_path, app=self.app, tool_source=tool_source, repository_id=repository_id, allow_code_files=False) + tool.assert_finalized() valid = True error_message = None except KeyError as e: diff --git a/test/unit/tools_support.py b/test/unit/tools_support.py index 1724558830b..665b2d4cb4d 100644 --- a/test/unit/tools_support.py +++ b/test/unit/tools_support.py @@ -99,6 +99,7 @@ class UsesTools(object): tool_source = get_tool_source(self.tool_file) try: self.tool = create_tool_from_source(self.app, tool_source, config_file=self.tool_file) + self.tool.assert_finalized() except Exception: self.tool = None if getattr(self, "tool_action", None and self.tool): diff --git a/test/unit/workflows/test_modules.py b/test/unit/workflows/test_modules.py index 8327493a6d7..5c42e2d374e 100644 --- a/test/unit/workflows/test_modules.py +++ b/test/unit/workflows/test_modules.py @@ -456,7 +456,8 @@ def __mock_tool( output_type='data')}, params_from_strings=mock.Mock(), check_and_update_param_values=mock.Mock(), - to_json=_to_json + to_json=_to_json, + assert_finalized=lambda: None, ) return tool