def setUp(self): super(TestGetJobTypeConfigs, self).setUp() self.job_template_mock.get_configs.return_value = ( api_job_templates.JobTemplate(None, JOB_TYPE_INFO)) # Command to test self.cmd = osc_jt.GetJobTypeConfigs(self.app, None)
def setUp(self): super(TestDeleteJobTemplate, self).setUp() self.job_mock.find_unique.return_value = api_j.JobTemplate( None, JOB_TEMPLATE_INFO) # Command to test self.cmd = osc_j.DeleteJobTemplate(self.app, None)
def setUp(self): super(TestListJobTemplates, self).setUp() self.job_mock.list.return_value = [api_j.JobTemplate( None, JOB_TEMPLATE_INFO)] # Command to test self.cmd = osc_j.ListJobTemplates(self.app, None)
def setUp(self): super(TestUpdateJobTemplate, self).setUp() self.job_mock.find_unique.return_value = api_j.JobTemplate( None, JOB_TEMPLATE_INFO) self.job_mock.update.return_value = mock.Mock( job_template=JOB_TEMPLATE_INFO.copy()) # Command to test self.cmd = osc_j.UpdateJobTemplate(self.app, None)
def setUp(self): super(TestCreateJobTemplate, self).setUp() self.job_mock.create.return_value = api_j.JobTemplate( None, JOB_TEMPLATE_INFO) self.jb_mock = self.app.client_manager.data_processing.job_binaries self.jb_mock.find_unique.return_value = mock.Mock(id='jb_id') self.jb_mock.reset_mock() # Command to test self.cmd = osc_j.CreateJobTemplate(self.app, None)