Warning

This document is for an in-development version 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.model.unittest_utils package

Interface provided by galaxy-data modules for unittest utilities for reuse by other modules.

class galaxy.model.unittest_utils.GalaxyDataTestApp(config: GalaxyDataTestConfig | None = None, **kwd)[source]

Bases: object

Minimal Galaxy mock app object that exposes and uses only what is needed for the galaxy-data package.

file_sources: ConfiguredFileSources = <galaxy.files.NullConfiguredFileSources object>
__init__(config: GalaxyDataTestConfig | None = None, **kwd)[source]
security: IdEncodingHelper
model: GalaxyModelMapping
security_agent: GalaxyRBACAgent
init_datatypes()[source]
class galaxy.model.unittest_utils.GalaxyDataTestConfig(root=None, **kwd)[source]

Bases: Bunch

Minimal Galaxy mock config object that exposes and uses only what is needed for the galaxy-data package.

__init__(root=None, **kwd)[source]
root: str
data_dir: str
security: IdEncodingHelper
database_connection: str

Submodules

galaxy.model.unittest_utils.data_app module

Mock GalaxyApp exposing config + functionality required for galaxy-data package.

There is a more expansive MockApp in test/unit/unittest_utils - but it isn’t packaged and it has dependencies from across the app. This mock application and config is more appropriate for testing galaxy-data functionality and will be included with galaxy-data.

class galaxy.model.unittest_utils.data_app.GalaxyDataTestConfig(root=None, **kwd)[source]

Bases: Bunch

Minimal Galaxy mock config object that exposes and uses only what is needed for the galaxy-data package.

__init__(root=None, **kwd)[source]
root: str
data_dir: str
security: IdEncodingHelper
database_connection: str
class galaxy.model.unittest_utils.data_app.GalaxyDataTestApp(config: GalaxyDataTestConfig | None = None, **kwd)[source]

Bases: object

Minimal Galaxy mock app object that exposes and uses only what is needed for the galaxy-data package.

file_sources: ConfiguredFileSources = <galaxy.files.NullConfiguredFileSources object>
__init__(config: GalaxyDataTestConfig | None = None, **kwd)[source]
security: IdEncodingHelper
model: GalaxyModelMapping
security_agent: GalaxyRBACAgent
init_datatypes()[source]
class galaxy.model.unittest_utils.data_app.MockSetExternalTool[source]

Bases: object

regenerate_imported_metadata_if_needed(*args, **kwds)[source]

galaxy.model.unittest_utils.store_fixtures module

Fixtures for populating model stores.

galaxy.model.unittest_utils.store_fixtures.now()

Return a new datetime representing UTC day and time.

galaxy.model.unittest_utils.store_fixtures.one_ld_library_model_store_dict()[source]
galaxy.model.unittest_utils.store_fixtures.one_ld_library_deferred_model_store_dict()[source]
galaxy.model.unittest_utils.store_fixtures.one_hda_model_store_dict(include_source=True)[source]
galaxy.model.unittest_utils.store_fixtures.history_model_store_dict()[source]
galaxy.model.unittest_utils.store_fixtures.deferred_hda_model_store_dict(source_uri='https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/2.bed', metadata_deferred=False)[source]
galaxy.model.unittest_utils.store_fixtures.deferred_hda_model_store_dict_bam(source_uri='https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/1.bam', metadata_deferred=False)[source]