Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 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()
Ejemplo n.º 7
0
def test_run_no_arg_format1_job(method_to_call):
    crontab = Crontab()
    crontab.run_job('4f30993ab69a8c5763ce55f762ef0433')
    method_to_call.assert_called_with()
Ejemplo n.º 8
0
def test_job_not_found():
    crontab = Crontab()
    crontab.run_job('4a8e5d03cf136a16c7d120c41efb602b')
Ejemplo n.º 9
0
def test_locked_job():
    crontab = Crontab()
    crontab.run_job('4a8e5d03cf136a16c7d120c41efb602b')
Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 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()
Ejemplo n.º 14
0
def test_run_no_arg_format1_job(method_to_call):
    crontab = Crontab()
    crontab.run_job('4f30993ab69a8c5763ce55f762ef0433')
    method_to_call.assert_called_with()
Ejemplo n.º 15
0
def test_job_not_found():
    crontab = Crontab()
    crontab.run_job('4a8e5d03cf136a16c7d120c41efb602b')
Ejemplo n.º 16
0
def test_locked_job():
    crontab = Crontab()
    crontab.run_job('4a8e5d03cf136a16c7d120c41efb602b')