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
tool_cache: ToolCache
watchers: ConfigWatchers
dataset_collection_manager: DatasetCollectionManager
hda_manager: HDAManager
workflow_manager: WorkflowsManager
history_manager: HistoryManager
job_metrics: JobMetrics
stop: bool
is_webapp: bool = True
__init__(config=None, **kwargs) None[source]
install_model: ModelMapping
property toolbox: ToolBox
wait_for_toolbox_reload(toolbox)[source]
setup_test_vault()[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]
galaxy.app_unittest_utils.galaxy_mock.mock_url_builder(*a, **k)[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]
property tag_handler
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]
property username
property email
init_user_in_database()[source]
property user_vault

Provide access to a user’s personal vault.

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 limited to tests of very ‘extensive’ classes.

class galaxy.app_unittest_utils.tools_support.UsesApp[source]

Bases: object

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