Files
galaxy/test/api/test_history_contents_provenance.py
T
John Chilton b0c250d791 Fix provenance controller for non-admins.
Cannot pass check_accessible=True to get_object with HistoryDatasetAssociations (because item.user is undefined.).
2014-05-21 14:33:24 -05:00

17 lines
719 B
Python

from base import api
from .helpers import DatasetPopulator
class TestProvenance( api.ApiTestCase ):
def setUp( self ):
super( TestProvenance, self ).setUp( )
self.dataset_populator = DatasetPopulator( self.galaxy_interactor )
def test_show_prov( self ):
history_id = self.dataset_populator.new_history()
new_dataset1 = self.dataset_populator.new_dataset( history_id, content='for prov' )
prov_response = self._get( "histories/%s/contents/%s/provenance" % ( history_id, new_dataset1[ "id" ] ) )
self._assert_status_code_is( prov_response, 200 )
self._assert_has_keys( prov_response.json(), "job_id", "id", "stdout", "stderr", "parameters", "tool_id" )