Пример #1
0
def recursive_job_for_lock_checking():
    if recursive_job_for_lock_checking.called_already:
        assert False, "This call should have been prevented by locking mechanism!"
    else:
        recursive_job_for_lock_checking.called_already = True
        crontab = Crontab()
        crontab.run_job('4a8e5d03cf136a16c7d120c41efb602b')
Пример #2
0
def recursive_job_for_lock_checking():
    if recursive_job_for_lock_checking.called_already:
        assert False, "This call should have been prevented by locking mechanism!"
    else:
        recursive_job_for_lock_checking.called_already = True
        crontab = Crontab()
        crontab.run_job('4a8e5d03cf136a16c7d120c41efb602b')
Пример #3
0
def test_run_args_only_format2_job(method_to_call):
    crontab = Crontab()
    crontab.run_job('fefa68aed4ff509331ee6a5b62ea5e5c')
    method_to_call.assert_called_with(1, 'two')
Пример #4
0
def test_run_format2_job(method_to_call):
    crontab = Crontab()
    crontab.run_job('13e8169dffe273b8b0c5f8abe1b6f643')
    method_to_call.assert_called_with(1, 'two', test=34, a='s2')
Пример #5
0
def test_run_args_only_format2_job(method_to_call):
    crontab = Crontab()
    crontab.run_job('369f8418b0f8cf1fff78c547516aa8e0')
    method_to_call.assert_called_with(1, 'two')
Пример #6
0
def test_run_no_arg_format1_job_with_suffix(method_to_call):
    crontab = Crontab()
    crontab.run_job('53e6fe5b66bd870e396d574ba1503c33')
    method_to_call.assert_called_with()
Пример #7
0
def test_run_no_arg_format1_job(method_to_call):
    crontab = Crontab()
    crontab.run_job('4f30993ab69a8c5763ce55f762ef0433')
    method_to_call.assert_called_with()
Пример #8
0
def test_job_not_found():
    crontab = Crontab()
    crontab.run_job('4a8e5d03cf136a16c7d120c41efb602b')
Пример #9
0
def test_locked_job():
    crontab = Crontab()
    crontab.run_job('4a8e5d03cf136a16c7d120c41efb602b')
Пример #10
0
def test_run_args_only_format2_job(method_to_call):
    crontab = Crontab()
    crontab.run_job('fefa68aed4ff509331ee6a5b62ea5e5c')
    method_to_call.assert_called_with(1, 'two')
Пример #11
0
def test_run_format2_job(method_to_call):
    crontab = Crontab()
    crontab.run_job('13e8169dffe273b8b0c5f8abe1b6f643')
    method_to_call.assert_called_with(1, 'two', test=34, a='s2')
Пример #12
0
def test_run_args_only_format2_job(method_to_call):
    crontab = Crontab()
    crontab.run_job('369f8418b0f8cf1fff78c547516aa8e0')
    method_to_call.assert_called_with(1, 'two')
Пример #13
0
def test_run_no_arg_format1_job_with_suffix(method_to_call):
    crontab = Crontab()
    crontab.run_job('53e6fe5b66bd870e396d574ba1503c33')
    method_to_call.assert_called_with()
Пример #14
0
def test_run_no_arg_format1_job(method_to_call):
    crontab = Crontab()
    crontab.run_job('4f30993ab69a8c5763ce55f762ef0433')
    method_to_call.assert_called_with()
Пример #15
0
def test_job_not_found():
    crontab = Crontab()
    crontab.run_job('4a8e5d03cf136a16c7d120c41efb602b')
Пример #16
0
def test_locked_job():
    crontab = Crontab()
    crontab.run_job('4a8e5d03cf136a16c7d120c41efb602b')