mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-28 02:58:18 +08:00
Sort the datasets by name when browsing a library from the Data Libraries view. Add a cleanup method to the functional test script for forms and requests - functional tests for libraries should now pass.
This commit is contained in:
@@ -312,3 +312,20 @@ class TestFormsAndRequests( TwillTestCase ):
|
||||
# check if the request's state is now set to 'submitted'
|
||||
assert request_two.state is not request_two.states.REJECTED, "The state of the request '%s' should be set to '%s'" \
|
||||
% ( request_two.name, request_two.states.REJECTED )
|
||||
def test_050_reset_data_for_later_test_runs( self ):
|
||||
"""Reseting data to enable later test runs to pass"""
|
||||
# TODO: RC: add whatever is missing from this method that should be marked
|
||||
# deleted or purged so that later test runs will correctly test features if the
|
||||
# database has not be purged.
|
||||
#
|
||||
# Logged in as admin_user
|
||||
##################
|
||||
# Eliminate all non-private roles
|
||||
##################
|
||||
for role in [ role_one ]:
|
||||
self.mark_role_deleted( self.security.encode_id( role.id ), role.name )
|
||||
self.purge_role( self.security.encode_id( role.id ), role.name )
|
||||
# Manually delete the role from the database
|
||||
sa_session.refresh( role )
|
||||
sa_session.delete( role )
|
||||
sa_session.flush()
|
||||
|
||||
@@ -113,8 +113,9 @@ class TestSecurityAndLibraries( TwillTestCase ):
|
||||
.first()
|
||||
# Make sure DatasetPermissions is correct - default is 'manage permissions'
|
||||
if len( latest_dataset.actions ) > 1:
|
||||
raise AssertionError( '%d DatasetPermissions were created for dataset id %d when it was created ( should have been 1 )' \
|
||||
% ( len( latest_dataset.actions ), latest_dataset.id ) )
|
||||
actions = [ a.action for a in latest_dataset.actions ]
|
||||
raise AssertionError( '%d DatasetPermissions (%s) were created for dataset id %d when it was created ( should have been 1 )' \
|
||||
% ( len( latest_dataset.actions ), str( actions ), latest_dataset.id ) )
|
||||
dp = sa_session.query( galaxy.model.DatasetPermissions ) \
|
||||
.filter( galaxy.model.DatasetPermissions.table.c.dataset_id==latest_dataset.id ) \
|
||||
.first()
|
||||
|
||||
Reference in New Issue
Block a user