예제 #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
예제 #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