tool_shed.test.base package

Submodules

tool_shed.test.base.common module

tool_shed.test.base.test_db_util module

tool_shed.test.base.test_db_util.delete_obj(obj)[source]
tool_shed.test.base.test_db_util.delete_user_roles(user)[source]
tool_shed.test.base.test_db_util.flush(obj)[source]
tool_shed.test.base.test_db_util.get_all_repositories()[source]
tool_shed.test.base.test_db_util.get_all_installed_repositories(actually_installed=False)[source]
tool_shed.test.base.test_db_util.get_category_by_name(name)[source]
tool_shed.test.base.test_db_util.get_default_user_permissions_by_role(role)[source]
tool_shed.test.base.test_db_util.get_default_user_permissions_by_user(user)[source]
tool_shed.test.base.test_db_util.get_galaxy_repository_by_name_owner_changeset_revision(repository_name, owner, changeset_revision)[source]
tool_shed.test.base.test_db_util.get_installed_repository_by_id(repository_id)[source]
tool_shed.test.base.test_db_util.get_installed_repository_by_name_owner(repository_name, owner, return_multiple=False)[source]
tool_shed.test.base.test_db_util.get_private_role(user)[source]
tool_shed.test.base.test_db_util.get_role(user, role_name)[source]
tool_shed.test.base.test_db_util.get_repository_role_association(repository_id, role_id)[source]
tool_shed.test.base.test_db_util.get_repository_reviews(repository_id, reviewer_user_id=None, changeset_revision=None)[source]
tool_shed.test.base.test_db_util.get_reviews_ordered_by_changeset_revision(repository_id, changelog_tuples, reviewer_user_id=None)[source]
tool_shed.test.base.test_db_util.get_repository_by_id(repository_id)[source]
tool_shed.test.base.test_db_util.get_repository_downloadable_revisions(repository_id)[source]
tool_shed.test.base.test_db_util.get_repository_metadata_for_changeset_revision(repository_id, changeset_revision)[source]
tool_shed.test.base.test_db_util.get_repository_review_by_user_id_changeset_revision(user_id, repository_id, changeset_revision)[source]
tool_shed.test.base.test_db_util.get_role_by_name(role_name)[source]
tool_shed.test.base.test_db_util.get_user(email)[source]
tool_shed.test.base.test_db_util.get_user_by_name(username)[source]
tool_shed.test.base.test_db_util.mark_obj_deleted(obj)[source]
tool_shed.test.base.test_db_util.refresh(obj)[source]
tool_shed.test.base.test_db_util.ga_refresh(obj)[source]
tool_shed.test.base.test_db_util.get_galaxy_private_role(user)[source]
tool_shed.test.base.test_db_util.get_galaxy_user(email)[source]
tool_shed.test.base.test_db_util.get_repository_by_name_and_owner(name, owner_username, return_multiple=False)[source]
tool_shed.test.base.test_db_util.get_repository_metadata_by_repository_id_changeset_revision(repository_id, changeset_revision)[source]

tool_shed.test.base.twilltestcase module

class tool_shed.test.base.twilltestcase.ShedTwillTestCase(methodName='runTest')[source]

Bases: galaxy_test.driver.testcase.DrivenFunctionalTestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

check_for_strings(strings_displayed=None, strings_not_displayed=None)[source]
check_page(strings_displayed, strings_displayed_count, strings_not_displayed)[source]

Checks a page for strings displayed, not displayed and number of occurrences of a string

check_page_for_string(patt)[source]

Looks for ‘patt’ in the current browser page

check_string_not_in_page(patt)[source]

Checks to make sure ‘patt’ is NOT in the page.

create(cntrller='user', email='test@bx.psu.edu', password='testuser', username='admin-user', redirect='')[source]
last_page()[source]

Return the last visited page (usually HTML, but can binary data as well).

last_url()[source]
login(email='test@bx.psu.edu', password='testuser', username='admin-user', redirect='', logout_first=True)[source]
logout()[source]
showforms()[source]

Shows form, helpful for debugging new tests

submit_form(form_no=- 1, button='runtool_btn', form=None, **kwd)[source]

Populates and submits a form from the keyword arguments.

visit_url(url, params=None, doseq=False, allowed_codes=None)[source]
write_temp_file(content, suffix='.html')[source]
add_repository_review_component(**kwd)[source]
assign_admin_role(repository, user)[source]
browse_category(category, strings_displayed=None, strings_not_displayed=None)[source]
browse_component_review(review, strings_displayed=None, strings_not_displayed=None)[source]
browse_custom_datatypes(strings_displayed=None, strings_not_displayed=None)[source]
browse_repository(repository, strings_displayed=None, strings_not_displayed=None)[source]
browse_repository_dependencies(strings_displayed=None, strings_not_displayed=None)[source]
browse_tool_shed(url, strings_displayed=None, strings_not_displayed=None)[source]
browse_tool_dependencies(strings_displayed=None, strings_not_displayed=None)[source]
browse_tools(strings_displayed=None, strings_not_displayed=None)[source]
check_count_of_metadata_revisions_associated_with_repository(repository, metadata_count)[source]
check_exported_repository_dependency(dependency_filename, repository_name, repository_owner)[source]
check_for_valid_tools(repository, strings_displayed=None, strings_not_displayed=None)[source]
check_galaxy_repository_db_status(repository_name, owner, expected_status)[source]
check_galaxy_repository_tool_panel_section(repository, expected_tool_panel_section)[source]
check_installed_repository_tool_dependencies(installed_repository, strings_displayed=None, strings_not_displayed=None, dependencies_installed=False)[source]
check_repository_changelog(repository, strings_displayed=None, strings_not_displayed=None)[source]
check_repository_dependency(repository, depends_on_repository, depends_on_changeset_revision=None, changeset_revision=None)[source]
check_repository_metadata(repository, tip_only=True)[source]
check_repository_tools_for_changeset_revision(repository, changeset_revision, tool_metadata_strings_displayed=None, tool_page_strings_displayed=None)[source]

Loop through each tool dictionary in the repository metadata associated with the received changeset_revision. For each of these, check for a tools attribute, and load the tool metadata page if it exists, then display that tool’s page.

check_repository_invalid_tools_for_changeset_revision(repository, changeset_revision, strings_displayed=None, strings_not_displayed=None)[source]

Load the invalid tool page for each invalid tool associated with this changeset revision and verify the received error messages.

check_string_count_in_page(pattern, min_count, max_count=None)[source]

Checks the number of ‘pattern’ occurrences in the current browser page

clone_repository(repository, destination_path)[source]
commit_and_push(repository, hgrepo, options, username, password)[source]
create_category(**kwd)[source]
create_repository_dependency(repository=None, repository_tuples=None, filepath=None, prior_installation_required=False, complex=False, package=None, version=None, strings_displayed=None, strings_not_displayed=None)[source]
create_repository_review(repository, review_contents_dict, changeset_revision=None, copy_from=None)[source]
create_user_in_galaxy(cntrller='user', email='test@bx.psu.edu', password='testuser', username='admin-user', redirect='')[source]
deactivate_repository(installed_repository, strings_displayed=None, strings_not_displayed=None)[source]
delete_files_from_repository(repository, filenames=None, strings_displayed=None, strings_not_displayed=None)[source]
delete_repository(repository)[source]
display_galaxy_browse_repositories_page(strings_displayed=None, strings_not_displayed=None)[source]
display_installed_jobs_list_page(installed_repository, data_manager_names=None, strings_displayed=None, strings_not_displayed=None)[source]
display_installed_repository_manage_page(installed_repository, strings_displayed=None, strings_not_displayed=None)[source]
display_manage_repository_page(repository, changeset_revision=None, strings_displayed=None, strings_not_displayed=None)[source]
display_repository_clone_page(owner_name, repository_name, strings_displayed=None, strings_not_displayed=None)[source]
display_repository_file_contents(repository, filename, filepath=None, strings_displayed=None, strings_not_displayed=None)[source]

Find a file in the repository and display the contents.

display_reviewed_repositories_owned_by_user(strings_displayed=None, strings_not_displayed=None)[source]
display_repository_reviews_by_user(user, strings_displayed=None, strings_not_displayed=None)[source]
edit_repository_categories(repository, categories_to_add=None, categories_to_remove=None, restore_original=True)[source]
edit_repository_information(repository, revert=True, **kwd)[source]
enable_email_alerts(repository, strings_displayed=None, strings_not_displayed=None)[source]
escape_html(string, unescape=False)[source]
expect_repo_created_strings(name)[source]
fetch_repository_metadata(repository, strings_displayed=None, strings_not_displayed=None)[source]
fill_review_form(review_contents_dict, strings_displayed=None, strings_not_displayed=None)[source]
galaxy_token()[source]
galaxy_login(email='test@bx.psu.edu', password='testuser', username='admin-user', redirect='', logout_first=True)[source]
galaxy_logout()[source]
generate_complex_dependency_xml(filename, filepath, repository_tuples, package, version)[source]
generate_simple_dependency_xml(repository_tuples, filename, filepath, dependency_description='', complex=False, package=None, version=None, prior_installation_required=False)[source]
generate_temp_path(test_script_path, additional_paths=None)[source]
get_datatypes_count()[source]
get_env_sh_path(tool_dependency_name, tool_dependency_version, repository)[source]

Return the absolute path to an installed repository’s env.sh file.

get_filename(filename, filepath=None)[source]
get_hg_repo(path)[source]
get_last_reviewed_revision_by_user(user, repository)[source]
get_repositories_category_api(categories, strings_displayed=None, strings_not_displayed=None)[source]
get_tool_dependency_path(tool_dependency_name, tool_dependency_version, repository)[source]

Return the absolute path for an installed tool dependency.

get_or_create_repository(owner=None, strings_displayed=None, strings_not_displayed=None, **kwd)[source]
get_repo_path(repository)[source]
get_repository_changelog_tuples(repository)[source]
get_repository_datatypes_count(repository)[source]
get_repository_file_list(repository, base_path, current_path=None)[source]

Recursively load repository folder contents and append them to a list. Similar to os.walk but via /repository/open_folder.

get_repository_metadata(repository)[source]
get_repository_metadata_by_changeset_revision(repository, changeset_revision)[source]
get_repository_metadata_revisions(repository)[source]
get_repository_tip(repository)[source]
get_sniffers_count()[source]
get_tools_from_repository_metadata(repository, include_invalid=False)[source]

Get a list of valid and (optionally) invalid tool dicts from the repository metadata.

get_tool_panel_section_from_api(metadata)[source]
get_tool_panel_section_from_repository_metadata(metadata)[source]
grant_role_to_user(user, role)[source]
grant_write_access(repository, usernames=None, strings_displayed=None, strings_not_displayed=None, post_submit_strings_displayed=None, post_submit_strings_not_displayed=None)[source]
initiate_installation_process(install_tool_dependencies=False, install_repository_dependencies=True, no_changes=True, new_tool_panel_section_label=None)[source]
install_repository(name, owner, category_name, install_resolver_dependencies=False, install_tool_dependencies=False, install_repository_dependencies=True, changeset_revision=None, strings_displayed=None, strings_not_displayed=None, preview_strings_displayed=None, post_submit_strings_displayed=None, new_tool_panel_section_label=None, includes_tools_for_display_in_tool_panel=True, **kwd)[source]
load_citable_url(username, repository_name, changeset_revision, encoded_user_id, encoded_repository_id, strings_displayed=None, strings_not_displayed=None, strings_displayed_in_iframe=None, strings_not_displayed_in_iframe=None)[source]
load_changeset_in_tool_shed(repository_id, changeset_revision, strings_displayed=None, strings_not_displayed=None)[source]
load_checkable_revisions(strings_displayed=None, strings_not_displayed=None)[source]
load_display_tool_page(repository, tool_xml_path, changeset_revision, strings_displayed=None, strings_not_displayed=None)[source]
load_galaxy_tool_migrations_page(strings_displayed=None, strings_not_displayed=None)[source]
load_invalid_tool_page(repository, tool_xml, changeset_revision, strings_displayed=None, strings_not_displayed=None)[source]
load_page_for_installed_tool(tool_guid, strings_displayed=None, strings_not_displayed=None)[source]
manage_review_components(strings_displayed=None, strings_not_displayed=None)[source]
preview_repository_in_tool_shed(name, owner, changeset_revision=None, strings_displayed=None, strings_not_displayed=None)[source]
reactivate_repository(installed_repository)[source]
reinstall_repository(installed_repository, install_repository_dependencies=True, install_tool_dependencies=False, no_changes=True, new_tool_panel_section_label='', strings_displayed=None, strings_not_displayed=None)[source]
repository_is_new(repository)[source]
reset_installed_repository_metadata(repository)[source]
reset_metadata_on_selected_repositories(repository_ids)[source]
reset_metadata_on_selected_installed_repositories(repository_ids)[source]
reset_repository_metadata(repository)[source]
review_repository(repository, review_contents_dict, user=None, changeset_revision=None)[source]
revoke_write_access(repository, username)[source]
search_for_valid_tools(search_fields=None, exact_matches=False, strings_displayed=None, strings_not_displayed=None, from_galaxy=False)[source]
send_message_to_repository_owner(repository, message, strings_displayed=None, strings_not_displayed=None, post_submit_strings_displayed=None, post_submit_strings_not_displayed=None)[source]
set_form_value(form, kwd, field_name, field_value)[source]

Set the form field field_name to field_value if it exists, and return the provided dict containing that value. If the field does not exist in the provided form, return a dict without that index.

set_repository_deprecated(repository, set_deprecated=True, strings_displayed=None, strings_not_displayed=None)[source]
set_repository_malicious(repository, set_malicious=True, strings_displayed=None, strings_not_displayed=None)[source]
tip_has_metadata(repository)[source]
undelete_repository(repository)[source]
uninstall_repository(installed_repository, strings_displayed=None, strings_not_displayed=None)[source]
update_installed_repository(installed_repository, strings_displayed=None, strings_not_displayed=None)[source]
update_tool_shed_status()[source]
upload_file(repository, filename, filepath, valid_tools_only, uncompress_file, remove_repo_files_not_in_tar, commit_message, strings_displayed=None, strings_not_displayed=None)[source]
upload_url(repository, url, filepath, valid_tools_only, uncompress_file, remove_repo_files_not_in_tar, commit_message, strings_displayed=None, strings_not_displayed=None)[source]
verify_installed_repositories(installed_repositories=None, uninstalled_repositories=None)[source]
verify_installed_repository_metadata_unchanged(name, owner)[source]
verify_installed_repository_no_tool_panel_section(repository)[source]

Verify that there is no ‘tool_panel_section’ entry in the repository metadata.

verify_installed_repository_data_table_entries(required_data_table_entries)[source]
verify_repository_reviews(repository, reviewer=None, strings_displayed=None, strings_not_displayed=None)[source]
verify_tool_metadata_for_installed_repository(installed_repository, strings_displayed=None, strings_not_displayed=None)[source]
verify_unchanged_repository_metadata(repository)[source]
visit_galaxy_url(url, params=None, doseq=False, allowed_codes=None)[source]
wait_for_repository_installation(repository_ids)[source]
history_id: Optional[str]
host: str
port: Optional[str]
url: str
keepOutdir: str
test_data_resolver: galaxy.tool_util.verify.test_data.TestDataResolver