commit/galaxy-central: inithello: Tool shed functional test enhancements - verify tool dependency display for all relevant repositories.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/184c5e409425/ changeset: 184c5e409425 user: inithello date: 2013-01-09 19:27:44 summary: Tool shed functional test enhancements - verify tool dependency display for all relevant repositories. affected #: 10 files diff -r b97bdb63115cf50562e423ac165cffcdd5bb64e1 -r 184c5e409425da36556de7edda910a7ffe6bc9d0 test/tool_shed/functional/test_0020_basic_repository_dependencies.py --- a/test/tool_shed/functional/test_0020_basic_repository_dependencies.py +++ b/test/tool_shed/functional/test_0020_basic_repository_dependencies.py @@ -63,12 +63,19 @@ 'repository_dependencies.xml', filepath=repository_dependencies_path, commit_message='Uploaded repository_dependencies.xml' ) - def test_0030_verify_emboss_5_repository_dependency_on_emboss_datatypes( self ): + def test_0030_verify_emboss_5_dependencies( self ): '''Verify that the emboss_5 repository now depends on the emboss_datatypes repository with correct name, owner, and changeset revision.''' repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name ) datatypes_repository = test_db_util.get_repository_by_name_and_owner( datatypes_repository_name, common.test_user_1_name ) changeset_revision = self.get_repository_tip( datatypes_repository ) - strings_displayed = [ datatypes_repository_name, common.test_user_1_name, changeset_revision, 'Repository dependencies' ] + strings_displayed = [ 'Tool dependencies', + 'emboss', + '5.0.0', + 'package', + datatypes_repository_name, + common.test_user_1_name, + changeset_revision, + 'Repository dependencies' ] self.display_manage_repository_page( repository, strings_displayed=strings_displayed ) def test_0040_verify_repository_metadata( self ): '''Verify that resetting the metadata does not change it.''' diff -r b97bdb63115cf50562e423ac165cffcdd5bb64e1 -r 184c5e409425da36556de7edda910a7ffe6bc9d0 test/tool_shed/functional/test_0030_repository_dependency_revisions.py --- a/test/tool_shed/functional/test_0030_repository_dependency_revisions.py +++ b/test/tool_shed/functional/test_0030_repository_dependency_revisions.py @@ -108,17 +108,18 @@ datatypes_tip = self.get_repository_tip( datatypes_repository ) # Iterate through all metadata revisions and check for repository dependencies. for metadata, changeset_revision in repository_metadata: - repository_dependency_metadata = metadata[ 'repository_dependencies' ][ 'repository_dependencies' ][ 0 ] + strings_displayed = [ str( metadata_elem ) for metadata_elem in metadata[ 'repository_dependencies' ][ 'repository_dependencies' ][ 0 ] ] # Remove the tool shed URL, because that's not displayed on the page (yet?) - repository_dependency_metadata.pop( repository_dependency_metadata.index( self.url ) ) + strings_displayed.pop( strings_displayed.index( self.url ) ) # Add the dependency description and datatypes repository details to the strings to check. - repository_dependency_metadata.extend( [ metadata[ 'repository_dependencies' ][ 'description' ], - datatypes_repository_name, - datatypes_repository.user.username, - datatypes_tip ] ) + strings_displayed.extend( [ metadata[ 'repository_dependencies' ][ 'description' ], + datatypes_repository_name, + datatypes_repository.user.username, + datatypes_tip ] ) + strings_displayed.extend( [ 'Tool dependencies', 'emboss', '5.0.0', 'package' ] ) self.display_manage_repository_page( repository, changeset_revision=changeset_revision, - strings_displayed=[ str( metadata ) for metadata in repository_dependency_metadata ] ) + strings_displayed=strings_displayed ) def test_0040_verify_repository_metadata( self ): '''Verify that resetting the metadata does not change it.''' emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name ) diff -r b97bdb63115cf50562e423ac165cffcdd5bb64e1 -r 184c5e409425da36556de7edda910a7ffe6bc9d0 test/tool_shed/functional/test_0040_repository_circular_dependencies.py --- a/test/tool_shed/functional/test_0040_repository_circular_dependencies.py +++ b/test/tool_shed/functional/test_0040_repository_circular_dependencies.py @@ -103,3 +103,9 @@ filtering_repository = test_db_util.get_repository_by_name_and_owner( filtering_repository_name, common.test_user_1_name ) for repository in [ freebayes_repository, filtering_repository ]: self.verify_unchanged_repository_metadata( repository ) + def test_0040_verify_tool_dependencies( self ): + '''Verify that freebayes displays tool dependencies.''' + repository = test_db_util.get_repository_by_name_and_owner( freebayes_repository_name, common.test_user_1_name ) + self.display_manage_repository_page( repository, + strings_displayed=[ 'freebayes', '0.9.4_9696d0ce8a9', 'samtools', '0.1.18', 'Valid tools' ], + strings_not_displayed=[ 'Invalid tools' ] ) diff -r b97bdb63115cf50562e423ac165cffcdd5bb64e1 -r 184c5e409425da36556de7edda910a7ffe6bc9d0 test/tool_shed/functional/test_0050_circular_dependencies_4_levels.py --- a/test/tool_shed/functional/test_0050_circular_dependencies_4_levels.py +++ b/test/tool_shed/functional/test_0050_circular_dependencies_4_levels.py @@ -148,7 +148,14 @@ self.check_repository_dependency( freebayes_repository, emboss_repository, changeset_revision ) self.display_manage_repository_page( freebayes_repository, strings_displayed=[ 'Freebayes depends on the filtering repository.' ] ) - def test_0035_verify_repository_metadata( self ): + def test_0035_verify_tool_dependencies( self ): + '''Check that freebayes and emboss display tool dependencies.''' + freebayes_repository = test_db_util.get_repository_by_name_and_owner( freebayes_repository_name, common.test_user_1_name ) + emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name ) + self.display_manage_repository_page( freebayes_repository, + strings_displayed=[ 'freebayes', '0.9.4_9696d0ce8a9', 'samtools', '0.1.18', 'Tool dependencies' ] ) + self.display_manage_repository_page( emboss_repository, strings_displayed=[ 'Tool dependencies', 'emboss', '5.0.0', 'package' ] ) + def test_0040_verify_repository_metadata( self ): '''Verify that resetting the metadata does not change it.''' emboss_datatypes_repository = test_db_util.get_repository_by_name_and_owner( emboss_datatypes_repository_name, common.test_user_1_name ) emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name ) diff -r b97bdb63115cf50562e423ac165cffcdd5bb64e1 -r 184c5e409425da36556de7edda910a7ffe6bc9d0 test/tool_shed/functional/test_1010_install_repository_with_tool_dependencies.py --- a/test/tool_shed/functional/test_1010_install_repository_with_tool_dependencies.py +++ b/test/tool_shed/functional/test_1010_install_repository_with_tool_dependencies.py @@ -1,9 +1,11 @@ from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os import tool_shed.base.test_db_util as test_db_util - +import logging repository_name = 'freebayes_0010' -repository_description="Galaxy's freebayes tool", -repository_long_description="Long description of Galaxy's freebayes tool", +repository_description="Galaxy's freebayes tool" +repository_long_description="Long description of Galaxy's freebayes tool" +category_name = 'Test 0010 Repository With Tool Dependencies' +log = logging.getLogger( __name__ ) class ToolWithToolDependencies( ShedTwillTestCase ): '''Test installing a repository with tool dependencies.''' @@ -26,7 +28,7 @@ admin_user_private_role = test_db_util.get_private_role( admin_user ) def test_0005_ensure_repositories_and_categories_exist( self ): '''Create the 0010 category and upload the freebayes repository to it, if necessary.''' - category = self.create_category( name='Test 0010 Repository With Tool Dependencies', description='Tests for a repository with tool dependencies.' ) + category = self.create_category( name=category_name, description='Tests for a repository with tool dependencies.' ) self.logout() self.login( email=common.test_user_1_email, username=common.test_user_1_name ) repository = self.get_or_create_repository( name=repository_name, @@ -63,16 +65,18 @@ """Browse the available tool sheds in this Galaxy instance and preview the freebayes tool.""" self.galaxy_logout() self.galaxy_login( email=common.admin_email, username=common.admin_username ) - self.browse_tool_shed( url=self.url, strings_displayed=[ 'Test 0010 Repository With Tool Dependencies' ] ) - category = test_db_util.get_category_by_name( 'Test 0010 Repository With Tool Dependencies' ) + self.browse_tool_shed( url=self.url, strings_displayed=[ category_name ] ) + category = test_db_util.get_category_by_name( category_name ) self.browse_category( category, strings_displayed=[ repository_name ] ) - self.preview_repository_in_tool_shed( repository_name, common.test_user_1_name, strings_displayed=[ repository_name, 'Valid tools', 'Tool dependencies' ] ) + strings_displayed = [ repository_name, 'Valid tools', 'Tool dependencies' ] + self.preview_repository_in_tool_shed( repository_name, common.test_user_1_name, strings_displayed=strings_displayed ) def test_0015_install_freebayes_repository( self ): '''Install the freebayes repository without installing tool dependencies.''' strings_displayed=[ 'set your tool_dependency_dir', 'can be automatically installed', 'Set the tool_dependency_dir' ] + strings_displayed.extend( [ 'Handle', 'tool dependencies', 'freebayes', '0.9.4_9696d0ce8a9', 'samtools', '0.1.18' ] ) self.install_repository( repository_name, common.test_user_1_name, - 'Test 0010 Repository With Tool Dependencies', + category_name, strings_displayed=strings_displayed, install_tool_dependencies=False, new_tool_panel_section='test_1010' ) diff -r b97bdb63115cf50562e423ac165cffcdd5bb64e1 -r 184c5e409425da36556de7edda910a7ffe6bc9d0 test/tool_shed/functional/test_1020_install_repository_with_repository_dependencies.py --- a/test/tool_shed/functional/test_1020_install_repository_with_repository_dependencies.py +++ b/test/tool_shed/functional/test_1020_install_repository_with_repository_dependencies.py @@ -74,9 +74,11 @@ '''Install the emboss repository without installing tool dependencies.''' global repository_datatypes_count global base_datatypes_count + strings_displayed = [ 'Handle', 'Missing', 'tool dependencies', 'emboss', '5.0.0', 'package' ] self.install_repository( 'emboss_0020', common.test_user_1_name, - 'Test 0020 Basic Repository Dependencies', + 'Test 0020 Basic Repository Dependencies', + strings_displayed=strings_displayed, install_tool_dependencies=False, new_tool_panel_section='test_1020' ) installed_repository = test_db_util.get_installed_repository_by_name_owner( 'emboss_0020', common.test_user_1_name ) diff -r b97bdb63115cf50562e423ac165cffcdd5bb64e1 -r 184c5e409425da36556de7edda910a7ffe6bc9d0 test/tool_shed/functional/test_1030_install_repository_with_dependency_revisions.py --- a/test/tool_shed/functional/test_1030_install_repository_with_dependency_revisions.py +++ b/test/tool_shed/functional/test_1030_install_repository_with_dependency_revisions.py @@ -113,9 +113,11 @@ global base_datatypes_count global running_standalone base_datatypes_count = int( self.get_datatypes_count() ) + strings_displayed = [ 'Handle', 'Missing', 'tool dependencies', 'emboss', '5.0.0', 'package' ] self.install_repository( 'emboss_0030', common.test_user_1_name, - 'Test 0030 Repository Dependency Revisions', + 'Test 0030 Repository Dependency Revisions', + strings_displayed=strings_displayed, install_tool_dependencies=False, new_tool_panel_section='test_1030' ) installed_repository = test_db_util.get_installed_repository_by_name_owner( 'emboss_0030', common.test_user_1_name ) diff -r b97bdb63115cf50562e423ac165cffcdd5bb64e1 -r 184c5e409425da36556de7edda910a7ffe6bc9d0 test/tool_shed/functional/test_1210_uninstall_reinstall_repository_with_tool_dependencies.py --- a/test/tool_shed/functional/test_1210_uninstall_reinstall_repository_with_tool_dependencies.py +++ b/test/tool_shed/functional/test_1210_uninstall_reinstall_repository_with_tool_dependencies.py @@ -59,9 +59,11 @@ '''Install the freebayes repository into the Galaxy instance.''' self.galaxy_logout() self.galaxy_login( email=common.admin_email, username=common.admin_username ) + strings_displayed = [ 'Handle', 'tool dependencies', 'freebayes', '0.9.4_9696d0ce8a9', 'samtools', '0.1.18' ] self.install_repository( 'freebayes_0010', common.test_user_1_name, 'Test 0010 Repository With Tool Dependencies', + strings_displayed=strings_displayed, new_tool_panel_section='test_1210' ) installed_repository = test_db_util.get_installed_repository_by_name_owner( 'freebayes_0010', common.test_user_1_name ) strings_displayed = [ installed_repository.name, diff -r b97bdb63115cf50562e423ac165cffcdd5bb64e1 -r 184c5e409425da36556de7edda910a7ffe6bc9d0 test/tool_shed/functional/test_1220_uninstall_reinstall_repository_with_repository_dependencies.py --- a/test/tool_shed/functional/test_1220_uninstall_reinstall_repository_with_repository_dependencies.py +++ b/test/tool_shed/functional/test_1220_uninstall_reinstall_repository_with_repository_dependencies.py @@ -70,9 +70,11 @@ self.galaxy_logout() self.galaxy_login( email=common.admin_email, username=common.admin_username ) base_datatypes_count = int( self.get_datatypes_count() ) + strings_displayed = [ 'Handle', 'Missing', 'tool dependencies', 'emboss', '5.0.0', 'package' ] self.install_repository( emboss_repository_name, common.test_user_1_name, - 'Test 0020 Basic Repository Dependencies', + 'Test 0020 Basic Repository Dependencies', + strings_displayed=strings_displayed, new_tool_panel_section='test_1210' ) installed_repository = test_db_util.get_installed_repository_by_name_owner( emboss_repository_name, common.test_user_1_name ) strings_displayed = [ installed_repository.name, diff -r b97bdb63115cf50562e423ac165cffcdd5bb64e1 -r 184c5e409425da36556de7edda910a7ffe6bc9d0 test/tool_shed/functional/test_1230_uninstall_reinstall_repository_with_dependency_revisions.py --- a/test/tool_shed/functional/test_1230_uninstall_reinstall_repository_with_dependency_revisions.py +++ b/test/tool_shed/functional/test_1230_uninstall_reinstall_repository_with_dependency_revisions.py @@ -107,9 +107,11 @@ self.galaxy_logout() self.galaxy_login( email=common.admin_email, username=common.admin_username ) base_datatypes_count = int( self.get_datatypes_count() ) + strings_displayed = [ 'Handle', 'Missing', 'tool dependencies', 'emboss', '5.0.0', 'package' ] self.install_repository( emboss_repository_name, common.test_user_1_name, 'Test 0030 Repository Dependency Revisions', + strings_displayed=strings_displayed, new_tool_panel_section='test_1210' ) installed_repository = test_db_util.get_installed_repository_by_name_owner( emboss_repository_name, common.test_user_1_name ) strings_displayed = [ installed_repository.name, 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)
-
Bitbucket