commit/galaxy-central: jmchilton: Add functional tests for @kellrott's workflow usage additions.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/b706c7c0844f/ Changeset: b706c7c0844f User: jmchilton Date: 2014-02-21 03:27:26 Summary: Add functional tests for @kellrott's workflow usage additions. Affected #: 1 file diff -r e87d6516105d6def9751cfb6df6e69b23bfacb14 -r b706c7c0844f3120952f39d6fc6826e111f267d3 test/functional/api/test_workflows.py --- a/test/functional/api/test_workflows.py +++ b/test/functional/api/test_workflows.py @@ -103,6 +103,29 @@ pja = pjas[ 0 ] self._assert_has_keys( pja, "action_type", "output_name", "action_arguments" ) + def test_invocation_usage( self ): + workflow = self.workflow_populator.load_workflow( name="test_usage" ) + workflow_request, history_id = self._setup_workflow_run( workflow ) + workflow_id = workflow_request[ "workflow_id" ] + response = self._get( "workflows/%s/usage" % workflow_id ) + self._assert_status_code_is( response, 200 ) + assert len( response.json() ) == 0 + run_workflow_response = self._post( "workflows", data=workflow_request ) + self._assert_status_code_is( run_workflow_response, 200 ) + + response = self._get( "workflows/%s/usage" % workflow_id ) + self._assert_status_code_is( response, 200 ) + usages = response.json() + assert len( usages ) == 1 + + usage_details_response = self._get( "workflows/%s/usage/%s" % ( workflow_id, usages[ 0 ][ "id" ] ) ) + self._assert_status_code_is( usage_details_response, 200 ) + usage_details = usage_details_response.json() + # Assert some high-level things about the structure of data returned. + self._assert_has_keys( usage_details, "inputs", "steps" ) + for step in usage_details[ "steps" ].values(): + self._assert_has_keys( step, "workflow_step_id", "order_index" ) + def test_post_job_action( self ): """ Tests both import and execution of post job actions. """ 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