Warning

This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy.app_unittest_utils package

Submodules

galaxy.app_unittest_utils.galaxy_mock module

Mock infrastructure for testing ModelManagers.

galaxy.app_unittest_utils.galaxy_mock.buildMockEnviron(**kwargs)[source]
class galaxy.app_unittest_utils.galaxy_mock.MockApp(config=None, **kwargs)[source]

Bases: Container, GalaxyDataTestApp

config: MockAppConfig
amqp_type: str
toolbox: ToolBox
tool_cache: ToolCache
install_model: ModelMapping
watchers: ConfigWatchers
dataset_collection_manager: DatasetCollectionManager
hda_manager: HDAManager
workflow_manager: WorkflowsManager
history_manager: HistoryManager
job_metrics: JobMetrics
stop: bool
__init__(config=None, **kwargs) None[source]
wait_for_toolbox_reload(toolbox)[source]
class galaxy.app_unittest_utils.galaxy_mock.MockLock[source]

Bases: object

class galaxy.app_unittest_utils.galaxy_mock.MockAppConfig(**kwargs)[source]

Bases: GalaxyDataTestConfig, CommonConfigurationMixin

class MockSchema(**kwds)[source]

Bases: Bunch

defaults = {'tool_dependency_dir': 'dependencies'}
__init__(**kwargs)[source]
property config_dict
security: IdEncodingHelper
database_connection: str
root: str
data_dir: str
class galaxy.app_unittest_utils.galaxy_mock.MockWebapp(security: IdEncodingHelper, **kwargs)[source]

Bases: object

__init__(security: IdEncodingHelper, **kwargs)[source]
class galaxy.app_unittest_utils.galaxy_mock.MockTrans(app=None, user=None, history=None, **kwargs)[source]

Bases: object

__init__(app=None, user=None, history=None, **kwargs)[source]
check_csrf_token(payload)[source]
handle_user_login(user)[source]
log_event(message)[source]
get_user()[source]
set_user(user)[source]

Set the current user.

property user
get_history(**kwargs)[source]
set_history(history)[source]
fill_template(filename, template_lookup=None, **kwargs)[source]
class galaxy.app_unittest_utils.galaxy_mock.MockVisualizationsRegistry[source]

Bases: object

BUILT_IN_VISUALIZATIONS = ['trackster']
get_visualizations(trans, target)[source]
class galaxy.app_unittest_utils.galaxy_mock.MockDir(structure_dict, where=None)[source]

Bases: object

__init__(structure_dict, where=None)[source]
create_root(structure_dict, where=None)[source]
create_structure(current_path, structure_dict)[source]
create_file(path, contents)[source]
remove()[source]
class galaxy.app_unittest_utils.galaxy_mock.MockTemplateHelpers[source]

Bases: object

js()[source]
css()[source]

galaxy.app_unittest_utils.tools_support module

Module contains test fixtures meant to aide in the testing of jobs and tool evaluation. Such extensive “fixtures” are something of an anti-pattern so use of this should be limitted to tests of very ‘extensive’ classes.

class galaxy.app_unittest_utils.tools_support.UsesApp[source]

Bases: object

setup_app()[source]
tear_down_app()[source]