def test_job_refresh(self): Job.job_refresh('tests.test_base_job.EmptyDummyJob', (), {}, ('foo', ), {}) assert EmptyDummyJob().get('foo') is not None
def test_job_refresh_perform_error(self, logger_mock): Job.job_refresh('tests.test_base_job.FailJob', (), {}, (), {}) assert 'Error running job' in (logger_mock.exception.call_args[0][0]) assert isinstance(logger_mock.exception.call_args[0][1], Exception)
def test_job_refresh_unkown_jobclass(self, logger_mock): Job.job_refresh('foomodule.BarJob', (), {}, (), {}) assert 'Unable to construct %s with' in ( logger_mock.error.call_args[0][0]) assert logger_mock.error.call_args[0][1] == 'foomodule.BarJob'
def test_job_refresh(self): Job.job_refresh('tests.test_base_job.EmptyDummyJob', (), {}, ('foo',), {}) assert EmptyDummyJob().get('foo') is not None
def test_job_refresh_unkown_jobclass(self, logger_mock): Job.job_refresh('foomodule.BarJob', (), {}, (), {}) assert 'Unable to construct %s with' in (logger_mock.error.call_args[0][0]) assert logger_mock.error.call_args[0][1] == 'foomodule.BarJob'