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.get_all_installed_repositories(session=None) List[ToolShedRepository] [source]
- tool_shed.test.base.test_db_util.get_installed_repository_by_name_owner(repository_name, owner, return_multiple=False, session=None)[source]
tool_shed.test.base.twilltestcase module
- class tool_shed.test.base.twilltestcase.ToolShedInstallationClient[source]
Bases:
object
- abstract check_galaxy_repository_tool_panel_section(repository: ToolShedRepository, expected_tool_panel_section: str) None [source]
- abstract deactivate_repository(installed_repository: ToolShedRepository) None [source]
Deactivate the supplied repository.
- abstract display_installed_jobs_list_page(installed_repository: ToolShedRepository, data_manager_names=None, strings_displayed=None) None [source]
If available, check data manager jobs for supplied strings.
- abstract installed_repository_extended_info(installed_repository: ToolShedRepository) Dict[str, Any] [source]
- abstract install_repository(name: str, owner: str, changeset_revision: str, install_tool_dependencies: bool, install_repository_dependencies: bool, new_tool_panel_section_label: str | None) None [source]
- abstract reactivate_repository(installed_repository: ToolShedRepository) None [source]
- abstract reset_metadata_on_installed_repositories(repositories: List[ToolShedRepository]) None [source]
- abstract reset_installed_repository_metadata(repository: ToolShedRepository) None [source]
- abstract uninstall_repository(installed_repository: ToolShedRepository) None [source]
- abstract update_installed_repository(installed_repository: ToolShedRepository, verify_no_updates: bool = False) Dict[str, Any] [source]
- abstract get_installed_repository_by_name_owner(repository_name: str, repository_owner: str) ToolShedRepository [source]
- abstract get_installed_repositories_by_name_owner(repository_name: str, repository_owner: str) List[ToolShedRepository] [source]
- abstract get_installed_repository_for(owner: str | None = None, name: str | None = None, changeset: str | None = None) Dict[str, Any] | None [source]
- abstract get_all_installed_repositories() List[ToolShedRepository] [source]
- abstract refresh_tool_shed_repository(repo: ToolShedRepository) None [source]
- class tool_shed.test.base.twilltestcase.GalaxyInteractorToolShedInstallationClient(testcase)[source]
Bases:
ToolShedInstallationClient
A Galaxy API + Database as a installation target for the tool shed.
- check_galaxy_repository_tool_panel_section(repository: ToolShedRepository, expected_tool_panel_section: str) None [source]
- deactivate_repository(installed_repository: ToolShedRepository) None [source]
Deactivate the supplied repository.
- display_installed_jobs_list_page(installed_repository: ToolShedRepository, data_manager_names=None, strings_displayed=None) None [source]
If available, check data manager jobs for supplied strings.
- installed_repository_extended_info(installed_repository: ToolShedRepository) Dict[str, Any] [source]
- install_repository(name: str, owner: str, changeset_revision: str, install_tool_dependencies: bool, install_repository_dependencies: bool, new_tool_panel_section_label: str | None)[source]
- reactivate_repository(installed_repository: ToolShedRepository) None [source]
- reset_metadata_on_installed_repositories(repositories: List[ToolShedRepository]) None [source]
- uninstall_repository(installed_repository: ToolShedRepository) None [source]
- update_installed_repository(installed_repository: ToolShedRepository, verify_no_updates: bool = False) Dict[str, Any] [source]
- reset_installed_repository_metadata(repository: ToolShedRepository) None [source]
- property tool_data_path
- property shed_tool_data_table_conf
- get_installed_repository_by_name_owner(repository_name: str, repository_owner: str) ToolShedRepository [source]
- get_installed_repositories_by_name_owner(repository_name: str, repository_owner: str) List[ToolShedRepository] [source]
- get_installed_repository_for(owner: str | None = None, name: str | None = None, changeset: str | None = None) Dict[str, Any] | None [source]
- get_all_installed_repositories() List[ToolShedRepository] [source]
- refresh_tool_shed_repository(repo: ToolShedRepository) None [source]
- class tool_shed.test.base.twilltestcase.StandaloneToolShedInstallationClient(testcase)[source]
Bases:
ToolShedInstallationClient
- check_galaxy_repository_tool_panel_section(repository: ToolShedRepository, expected_tool_panel_section: str) None [source]
- deactivate_repository(installed_repository: ToolShedRepository) None [source]
Deactivate the supplied repository.
- display_installed_jobs_list_page(installed_repository: ToolShedRepository, data_manager_names=None, strings_displayed=None) None [source]
If available, check data manager jobs for supplied strings.
- installed_repository_extended_info(installed_repository: ToolShedRepository) Dict[str, Any] [source]
- install_repository(name: str, owner: str, changeset_revision: str, install_tool_dependencies: bool, install_repository_dependencies: bool, new_tool_panel_section_label: str | None)[source]
- reactivate_repository(installed_repository: ToolShedRepository) None [source]
- reset_metadata_on_installed_repositories(repositories: List[ToolShedRepository]) None [source]
- reset_installed_repository_metadata(repository: ToolShedRepository) None [source]
- uninstall_repository(installed_repository: ToolShedRepository) None [source]
- update_installed_repository(installed_repository: ToolShedRepository, verify_no_updates: bool = False) Dict[str, Any] [source]
- get_installed_repository_by_name_owner(repository_name: str, repository_owner: str) ToolShedRepository [source]
- get_installed_repositories_by_name_owner(repository_name: str, repository_owner: str) List[ToolShedRepository] [source]
- get_installed_repository_for(owner: str | None = None, name: str | None = None, changeset: str | None = None) Dict[str, Any] | None [source]
- get_all_installed_repositories() List[ToolShedRepository] [source]
- refresh_tool_shed_repository(repo: ToolShedRepository) None [source]
- property shed_tool_data_table_conf
- property tool_data_path
- class tool_shed.test.base.twilltestcase.ShedTwillTestCase[source]
Bases:
ShedApiTestCase
Class of FunctionalTestCase geared toward HTML interactions using the Twill library.
- 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
- create(cntrller: str = 'user', email: str = 'test@bx.psu.edu', password: str = 'testuser', username: str = 'admin-user', redirect: str | None = None) Tuple[bool, bool, bool] [source]
- login(email: str = 'test@bx.psu.edu', password: str = 'testuser', username: str = 'admin-user', redirect: str | None = None, logout_first: bool = True, explicit_logout: bool = False)[source]
- logout(explicit: bool = False)[source]
logout of the current tool shed session.
By default this is a logout if logged in action, however if explicit is True - ensure there is a session and be explicit in logging out to provide extract test structure.
- submit_form(form_no=-1, button='runtool_btn', form=None, **kwd)[source]
Populates and submits a form from the keyword arguments.
- browse_repository(repository: Repository, strings_displayed=None, strings_not_displayed=None)[source]
- check_count_of_metadata_revisions_associated_with_repository(repository: Repository, metadata_count)[source]
- check_repository_changelog(repository: Repository, strings_displayed=None, strings_not_displayed=None)[source]
- check_repository_dependency(repository: Repository, depends_on_repository: Repository, depends_on_changeset_revision=None, changeset_revision=None)[source]
- check_repository_tools_for_changeset_revision(repository: 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: 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
- check_galaxy_repository_tool_panel_section(repository: ToolShedRepository, expected_tool_panel_section: str) None [source]
- create_repository_dependency(repository: Repository, repository_tuples=None, filepath=None, prior_installation_required=False, complex=False, package=None, version=None, strings_displayed=None, strings_not_displayed=None)[source]
- deactivate_repository(installed_repository: ToolShedRepository) None [source]
- add_file_to_repository(repository: Repository, source: str, target: str | None = None, strings_displayed=None, commit_message: str | None = None)[source]
- commit_tar_to_repository(repository: Repository, source: str, commit_message=None, strings_displayed=None)[source]
- display_installed_jobs_list_page(installed_repository, data_manager_names=None, strings_displayed=None)[source]
- display_manage_repository_page(repository: 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: Repository, filename, filepath=None, strings_displayed=None, strings_not_displayed=None)[source]
Find a file in the repository and display the contents.
- edit_repository_categories(repository: Repository, categories_to_add: List[str], categories_to_remove: List[str], restore_original=True) None [source]
- enable_email_alerts(repository: Repository, strings_displayed=None, strings_not_displayed=None) None [source]
- fetch_repository_metadata(repository: Repository, strings_displayed=None, strings_not_displayed=None)[source]
- generate_simple_dependency_xml(repository_tuples, filename, filepath, dependency_description='', complex=False, package=None, version=None, prior_installation_required=False)[source]
- get_all_installed_repositories() List[ToolShedRepository] [source]
- get_repositories_category_api(categories: List[Category], strings_displayed=None, strings_not_displayed=None)[source]
- get_or_create_repository(category: Category, owner: str, name: str, strings_displayed=None, strings_not_displayed=None, **kwd) Repository [source]
- get_repository_file_list(repository: Repository, base_path: str, current_path=None) List[str] [source]
Recursively load repository folder contents and append them to a list. Similar to os.walk but via /repository/open_folder.
- get_repository_metadata_for_db_object(repository: Repository)[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.
- grant_write_access(repository: Repository, usernames=None, strings_displayed=None, strings_not_displayed=None, post_submit_strings_displayed=None, post_submit_strings_not_displayed=None)[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_display_tool_page(repository: Repository, tool_xml_path, changeset_revision, strings_displayed=None, strings_not_displayed=None)[source]
- load_invalid_tool_page(repository: Repository, tool_xml, changeset_revision, strings_displayed=None, strings_not_displayed=None)[source]
- preview_repository_in_tool_shed(name: str, owner: str, changeset_revision: str | None = None, strings_displayed=None, strings_not_displayed=None)[source]
- reinstall_repository_api(installed_repository, install_repository_dependencies=True, install_tool_dependencies=False, new_tool_panel_section_label='')[source]
- search_for_valid_tools(search_fields=None, exact_matches=False, strings_displayed=None, strings_not_displayed=None, from_galaxy=False)[source]
- set_repository_deprecated(repository: Repository, set_deprecated=True, strings_displayed=None, strings_not_displayed=None)[source]
- set_repository_malicious(repository: Repository, set_malicious=True, strings_displayed=None, strings_not_displayed=None) None [source]
- update_installed_repository(installed_repository: ToolShedRepository, verify_no_updates: bool = False) Dict[str, Any] [source]
- verify_installed_repository_no_tool_panel_section(repository)[source]
Verify that there is no ‘tool_panel_section’ entry in the repository metadata.
- property shed_tool_data_table_conf
- property tool_data_path
- pytestmark = [Mark(name='usefixtures', args=('shed_browser',), kwargs={})]