commit/galaxy-central: inithello: Fix failing functional test for dataset features.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/8264c77e4f07/ Changeset: 8264c77e4f07 User: inithello Date: 2013-04-28 17:03:41 Summary: Fix failing functional test for dataset features. Affected #: 2 files diff -r 6638dbca87d3c7dfc4e5b0522eb4a17f124b5040 -r 8264c77e4f07c0dee932add796f5ee7ce02245b3 test/base/twilltestcase.py --- a/test/base/twilltestcase.py +++ b/test/base/twilltestcase.py @@ -255,6 +255,13 @@ def get_latest_history( self ): return self.json_from_url( '/api/histories' )[ 0 ] + + def find_hda_by_dataset_name( self, name, history=None ): + if history is None: + history = self.get_history_from_api() + for hda in history: + if hda[ 'name' ] == name: + return hda def check_history_for_errors( self ): """Raises an exception if there are errors in a history""" diff -r 6638dbca87d3c7dfc4e5b0522eb4a17f124b5040 -r 8264c77e4f07c0dee932add796f5ee7ce02245b3 test/functional/test_dataset_features.py --- a/test/functional/test_dataset_features.py +++ b/test/functional/test_dataset_features.py @@ -1,7 +1,9 @@ from base.twilltestcase import TwillTestCase import base.test_db_util as test_db_util + class TestDatasetFeatures( TwillTestCase ): + def test_0000_initiate_users( self ): """Ensuring all required user accounts exist""" self.logout() @@ -16,14 +18,18 @@ self.new_history() latest_history = test_db_util.get_latest_history_for_user( admin_user ) assert latest_history is not None, "Problem retrieving latest_history from database" + def test_0005_initiate_data( self ): '''Ensure that data exists for this test suite.''' self.upload_file( '1.bed' ) + def test_0010_view_dataset_params( self ): '''Test viewing a dataset's parameters.''' - hda = test_db_util.get_latest_hda() - self.visit_url( '/datasets/%s/show_params' % self.security.encode_id( hda.hid ) ) + hda = self.find_hda_by_dataset_name( '1.bed' ) + assert hda is not None, 'Could not retrieve latest hda from history API.' + self.visit_url( '/datasets/%s/show_params' % hda[ 'id'] ) self.check_for_strings( strings_displayed=[ '1.bed', 'uploaded' ] ) + def test_0015_report_dataset_error( self ): '''Load and submit the report error form. This should show an error message, as the functional test instance should not be configured for email.''' hda = test_db_util.get_latest_hda() 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