def test_configure_project_type_with_existing_project_type_calls_teardown(self): executor = SubjobExecutor(1) executor._project_type = Mock() self.patch('app.slave.subjob_executor.util') executor.configure_project_type({}) executor._project_type.teardown_executor.assert_called_once()
def test_configure_project_type_with_existing_project_type_calls_teardown( self): executor = SubjobExecutor(1) executor._project_type = Mock() self.patch('app.slave.subjob_executor.util') executor.configure_project_type({}) executor._project_type.teardown_executor.assert_called_once()
def test_configure_project_type_passes_project_type_params_and_calls_setup_executor(self): project_type_params = {'test': 'value'} util = self.patch('app.slave.subjob_executor.util') util.create_project_type = Mock(return_value=Mock()) executor = SubjobExecutor(1) executor.configure_project_type(project_type_params) util.create_project_type.assert_called_with(project_type_params) executor._project_type.setup_executor.assert_called_with()
def test_configure_project_type_passes_project_type_params_and_calls_setup_executor( self): project_type_params = {'test': 'value'} util = self.patch('app.slave.subjob_executor.util') util.create_project_type = Mock(return_value=Mock()) executor = SubjobExecutor(1) executor.configure_project_type(project_type_params) util.create_project_type.assert_called_with(project_type_params) executor._project_type.setup_executor.assert_called_with()