Add tool execution unit test for rerun_remapping.

This commit is contained in:
John Chilton
2014-01-14 14:43:39 -06:00
parent 715f4646eb
commit baac81143e
2 changed files with 14 additions and 0 deletions
+12
View File
@@ -89,6 +89,18 @@ class ToolExecutionTestCase( TestCase, UsesApp ):
runtool_btn="dummy",
)
assert template == "tool_executed.mako"
# Didn't specify a rerun_remap_id so this should be None
assert self.tool_action.execution_call_args[ 0 ][ "rerun_remap_job_id" ] is None
def test_remap_job( self ):
self.__init_tool( SIMPLE_TOOL_CONTENTS )
template, template_vars = self.__handle_with_incoming(
param1="moo",
rerun_remap_job_id=self.app.security.encode_id(123),
runtool_btn="dummy",
)
assert template == "tool_executed.mako"
assert self.tool_action.execution_call_args[ 0 ][ "rerun_remap_job_id" ] == 123
def test_repeat_state_updates( self ):
self.__init_tool( REPEAT_TOOL_CONTENTS )
+2
View File
@@ -9,6 +9,7 @@ import tempfile
import shutil
from galaxy.util.bunch import Bunch
from galaxy.web.security import SecurityHelper
import galaxy.model
from galaxy.model import mapping
@@ -54,6 +55,7 @@ class MockApp( object ):
self.model[ module_member_name ] = module_member
self.toolbox = None
self.object_store = None
self.security = SecurityHelper(id_secret="testing")
class MockContext(object):