示例#1
0
 def job_config(self):
     if not self.__job_configuration:
         base_handler_pools = self.__job_configuration_base_pools or JobConfiguration.DEFAULT_BASE_HANDLER_POOLS
         mock_uwsgi = mock.Mock()
         mock_uwsgi.mule_id = lambda: 1
         with mock.patch('galaxy.web.stack.uwsgi', mock_uwsgi), \
                 mock.patch('galaxy.web.stack.uwsgi.opt', self.__uwsgi_opt), \
                 mock.patch('galaxy.jobs.JobConfiguration.DEFAULT_BASE_HANDLER_POOLS', base_handler_pools):
             self.__job_configuration = JobConfiguration(self.app)
     return self.__job_configuration
示例#2
0
 def job_config(self):
     if not self.__job_configuration:
         self.__job_configuration = JobConfiguration(self.app)
     return self.__job_configuration
示例#3
0
    #  "resource_params": {"stampede_compute_resource": "stampede_normal"},
    #  "return_submit_native_specification": "--partition=normal --nodes=1 --cpus-per-task=16 --time=48:00:00 --account=TG-MCB140147",
    #  "return_destination_id": "stampede_normal"},
    # {"ref_size": 1024 ** 4,
    #  "tool": tool_rnastar_indexed,
    #  "sbatch_node": "jetstream-iu-large",
    #  "resource_params": {"stampede_compute_resource": "stampede_development"},
    #  "return_submit_native_specification": "--partition=development --nodes=1 --cpus-per-task=16 --time=00:30:00 --account=TG-MCB140147",
    #  "return_destination_id": "stampede_development"},
]

mock_app = mock.MagicMock()
mock_app.tool_data_tables.get.return_value.get_entry.return_value = "mock_path"
mock_app.config.job_config_file = MAIN_JOB_CONF
mock_app.config.job_resource_params_file = MAIN_JOB_RESOURCE_PARAMS_CONF
mock_app.job_config = JobConfiguration(mock_app)
mock_job = mock.Mock()
mock_job.parameters = []
mock_job.id = 1


def test_user_presence():
    with pytest.raises(JobMappingException):
        mdw.dynamic_multi_bridges_select(mock_app,
                                         tool_rnastar_indexed,
                                         mock_job,
                                         user_email=None,
                                         resource_params=[])


@mock.patch("subprocess.Popen")