commit/galaxy-central: jmchilton: Fix unit tests for 315997f.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/2ba39a38f8fe/ Changeset: 2ba39a38f8fe User: jmchilton Date: 2014-06-02 01:30:44 Summary: Fix unit tests for 315997f. Affected #: 2 files diff -r da27d76bd099477232423b3762bf393976c0c08b -r 2ba39a38f8fe89654f07b0993db88fd94256c375 test/unit/tools/test_evaluation.py --- a/test/unit/tools/test_evaluation.py +++ b/test/unit/tools/test_evaluation.py @@ -142,10 +142,17 @@ <option value="/old/path/mouse">Mouse</option></param>''') parameter = SelectToolParameter( self.tool, xml ) + + def get_field_by_name_for_value( name, value, trans, other_values ): + assert value == "/old/path/human" + assert name == "path" + return ["/old/path/human"] + + parameter.options = Bunch(get_field_by_name_for_value=get_field_by_name_for_value) self.tool.set_params( { "index_path": parameter } ) - self.tool._command_line = "prog1 $index_path" + self.tool._command_line = "prog1 $index_path.fields.path" def test_path_rewriter(v): if v: diff -r da27d76bd099477232423b3762bf393976c0c08b -r 2ba39a38f8fe89654f07b0993db88fd94256c375 test/unit/tools/test_wrappers.py --- a/test/unit/tools/test_wrappers.py +++ b/test/unit/tools/test_wrappers.py @@ -66,17 +66,9 @@ def test_select_wrapper_with_path_rewritting(tool): parameter = _setup_blast_tool(tool, multiple=True) wrapper = SelectToolParameterWrapper( parameter, ["val1", "val2"], tool.app, other_values={}, path_rewriter=lambda v: "Rewrite<%s>" % v ) - assert str(wrapper) == "Rewrite<val1>,Rewrite<val2>" assert wrapper.fields.path == "Rewrite<path1>,Rewrite<path2>" -@with_mock_tool -def test_select_wrapper_drilldown_path_rewritting(tool): - parameter = _drilldown_parameter(tool) - wrapper = SelectToolParameterWrapper( parameter, ["option3"], tool.app, other_values={}, path_rewriter=lambda v: "Rewrite<%s>" % v ) - assert str(wrapper) == "Rewrite<option3>" - - def test_raw_object_wrapper(): obj = Bunch(x=4) wrapper = RawObjectWrapper(obj) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org