Fix unit tests

This commit is contained in:
mvdbeek
2020-04-25 20:40:26 +02:00
parent bea3d0e41f
commit 785cfce3fa
3 changed files with 4 additions and 1 deletions
@@ -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:
+1
View File
@@ -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):
+2 -1
View File
@@ -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