Пример #1
0
    def __init__(self, config=None, **kwargs):
        self.config = config or MockAppConfig(**kwargs)
        self.security = self.config.security
        self.name = kwargs.get('name', 'galaxy')
        self.object_store = objectstore.build_object_store_from_config(
            self.config)
        self.model = mapping.init("/tmp",
                                  self.config.database_connection,
                                  create_tables=True,
                                  object_store=self.object_store)
        self.security_agent = self.model.security_agent
        self.visualizations_registry = MockVisualizationsRegistry()
        self.tag_handler = tags.GalaxyTagHandler(self.model.context)
        self.quota_agent = quota.DatabaseQuotaAgent(self.model)
        self.init_datatypes()
        self.job_config = Bunch(dynamic_params=None, destinations={})
        self.tool_data_tables = {}
        self.dataset_collections_service = None
        self.container_finder = NullContainerFinder()
        self._toolbox_lock = MockLock()
        self.tool_shed_registry = Bunch(tool_sheds={})
        self.genome_builds = GenomeBuilds(self)
        self.job_manager = NoopManager()
        self.application_stack = ApplicationStack()
        self.auth_manager = AuthManager(self)
        self.user_manager = UserManager(self)
        self.execution_timer_factory = Bunch(
            get_timer=StructuredExecutionTimer)

        def url_for(*args, **kwds):
            return "/mock/url"

        self.url_for = url_for
Пример #2
0
    def __init__(self, config=None, **kwargs):
        super().__init__()
        self[BasicApp] = self
        self[MinimalManagerApp] = self
        self[StructuredApp] = self
        self.config = config or MockAppConfig(**kwargs)
        self.security = self.config.security
        self[idencoding.IdEncodingHelper] = self.security
        self.name = kwargs.get('name', 'galaxy')
        self.object_store = objectstore.build_object_store_from_config(
            self.config)
        self.model = mapping.init("/tmp",
                                  self.config.database_connection,
                                  create_tables=True,
                                  object_store=self.object_store)
        self[SharedModelMapping] = self.model
        self[GalaxyModelMapping] = self.model
        self[scoped_session] = self.model.context
        self.security_agent = self.model.security_agent
        self.visualizations_registry = MockVisualizationsRegistry()
        self.tag_handler = tags.GalaxyTagHandler(self.model.context)
        self[tags.GalaxyTagHandler] = self.tag_handler
        self.quota_agent = quota.DatabaseQuotaAgent(self.model)
        self.init_datatypes()
        self.job_config = Bunch(dynamic_params=None,
                                destinations={},
                                use_messaging=False,
                                assign_handler=lambda *args, **kwargs: None)
        self.tool_data_tables = {}
        self.dataset_collections_service = None
        self.container_finder = NullContainerFinder()
        self._toolbox_lock = MockLock()
        self.tool_shed_registry = Bunch(tool_sheds={})
        self.genome_builds = GenomeBuilds(self)
        self.job_manager = NoopManager()
        self.application_stack = ApplicationStack()
        self.auth_manager = AuthManager(self.config)
        self.user_manager = UserManager(self)
        self.execution_timer_factory = Bunch(
            get_timer=StructuredExecutionTimer)
        self.is_job_handler = False
        rebind_container_to_task(self)

        def url_for(*args, **kwds):
            return "/mock/url"

        self.url_for = url_for
Пример #3
0
    def __init__(self, config=None, **kwargs):
        super().__init__()
        config = config or MockAppConfig(**kwargs)
        GalaxyDataTestApp.__init__(self, config=config, **kwargs)
        self[BasicSharedApp] = self
        self[MinimalManagerApp] = self
        self[StructuredApp] = self
        self[idencoding.IdEncodingHelper] = self.security
        self.name = kwargs.get('name', 'galaxy')
        self[SharedModelMapping] = self.model
        self[GalaxyModelMapping] = self.model
        self[galaxy_scoped_session] = self.model.context
        self.visualizations_registry = MockVisualizationsRegistry()
        self.tag_handler = tags.GalaxyTagHandler(self.model.context)
        self[tags.GalaxyTagHandler] = self.tag_handler
        self.quota_agent = quota.DatabaseQuotaAgent(self.model)
        self.job_config = Bunch(
            dynamic_params=None,
            destinations={},
            use_messaging=False,
            assign_handler=lambda *args, **kwargs: None
        )
        self.tool_data_tables = ToolDataTableManager(tool_data_path=self.config.tool_data_path)
        self.dataset_collections_service = None
        self.container_finder = NullContainerFinder()
        self._toolbox_lock = MockLock()
        self.tool_shed_registry = Bunch(tool_sheds={})
        self.genome_builds = GenomeBuilds(self)
        self.job_manager = NoopManager()
        self.application_stack = ApplicationStack()
        self.auth_manager = AuthManager(self.config)
        self.user_manager = UserManager(self)
        self.execution_timer_factory = Bunch(get_timer=StructuredExecutionTimer)
        self.file_sources = Bunch(to_dict=lambda *args, **kwargs: {})
        self.interactivetool_manager = Bunch(create_interactivetool=lambda *args, **kwargs: None)
        self.is_job_handler = False
        self.biotools_metadata_source = None
        rebind_container_to_task(self)

        def url_for(*args, **kwds):
            return "/mock/url"
        self.url_for = url_for
Пример #4
0
 def __init__(self, config=None, **kwargs):
     self.config = config or MockAppConfig(**kwargs)
     self.security = self.config.security
     self.name = kwargs.get('name', 'galaxy')
     self.object_store = objectstore.build_object_store_from_config(
         self.config)
     self.model = mapping.init("/tmp",
                               "sqlite:///:memory:",
                               create_tables=True,
                               object_store=self.object_store)
     self.security_agent = self.model.security_agent
     self.visualizations_registry = MockVisualizationsRegistry()
     self.tag_handler = tags.GalaxyTagManager(self.model.context)
     self.quota_agent = quota.QuotaAgent(self.model)
     self.init_datatypes()
     self.job_config = Bunch(dynamic_params=None, destinations={})
     self.tool_data_tables = {}
     self.dataset_collections_service = None
     self.container_finder = NullContainerFinder()
     self._toolbox_lock = MockLock()
     self.genome_builds = GenomeBuilds(self)
     self.job_manager = NoopManager()
     self.application_stack = ApplicationStack()