Exemplo n.º 1
0
def test_set_state_pipe_to_children():
    import jip.db
    job = jip.db.Job()
    child = jip.db.Job()
    job.pipe_to.append(child)
    set_state(job, jip.db.STATE_RUNNING)
    assert job.state == jip.db.STATE_RUNNING
Exemplo n.º 2
0
def test_set_state_single_job():
    import jip.db
    job = jip.db.Job()
    set_state(job, jip.db.STATE_RUNNING)
    assert job.state == jip.db.STATE_RUNNING

    set_state(job, jip.db.STATE_DONE)
    assert job.state == jip.db.STATE_DONE