Пример #1
0
def test_validate_job_handler_message():
    message = JobHandlerMessage(task='setup', job_id=42)
    message.validate()

    message = JobHandlerMessage(task='setup')
    error = None
    try:
        message.validate()
    except AssertionError as e:
        error = e
    assert error is not None
Пример #2
0
 def _message_callback(self, job):
     return JobHandlerMessage(task='setup', job_id=job.id)