do not allow codefiles for TS tool loading

This commit is contained in:
Martin Cech
2018-02-12 14:06:50 -05:00
parent c5568a7b1a
commit ba3b3d5c18
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -292,7 +292,7 @@ class ToolValidator(object):
tool_location_fetcher=ToolLocationFetcher(),
)
try:
tool = create_tool_from_source(config_file=full_path, app=self.app, tool_source=tool_source, repository_id=repository_id)
tool = create_tool_from_source(config_file=full_path, app=self.app, tool_source=tool_source, repository_id=repository_id, allow_code_files=False)
valid = True
error_message = None
except KeyError as e:
+8
View File
@@ -27,6 +27,14 @@ def test_validate_valid_tool():
assert message is None
def test_tool_validation_denies_allow_codefile():
with get_tool_validator() as tv, setup_bismark() as repo_dir:
full_path = os.path.join(repo_dir, 'bismark_methylation_extractor.xml')
tool, valid, message = tv.load_tool_from_config(repository_id=None,
full_path=full_path)
assert tool._allow_code_files is False
def test_validate_tool_without_index():
with get_tool_validator() as tv, setup_bismark() as repo_dir:
full_path = os.path.join(repo_dir, 'bismark_bowtie2_wrapper.xml')