예제 #1
0
파일: test_runs.py 프로젝트: kshtsk/paddles
 def test_allows_waiting_status(self):
     self.app.post_json('/runs/', dict(name="foo"))
     self.app.post_json('/runs/foo/jobs/', dict(
         job_id=1,
         status="waiting",
     ))
     new_run = Run.get(1)
     assert new_run.status == 'waiting'
예제 #2
0
파일: test_runs.py 프로젝트: ceph/paddles
 def test_allows_waiting_status(self):
     self.app.post_json('/runs/', dict(name="foo"))
     self.app.post_json('/runs/foo/jobs/', dict(
         job_id=1,
         status="waiting",
     ))
     new_run = Run.get(1)
     assert new_run.status == 'waiting'
예제 #3
0
 def test_jobs_count(self):
     Run.query.delete()
     Job.query.delete()
     new_run = Run('test_jobs_count')
     Job({}, new_run)
     Job({}, new_run)
     models.commit()
     run_as_json = Run.get(1).__json__()
     assert run_as_json['jobs_count'] == 2
예제 #4
0
파일: test_runs.py 프로젝트: kshtsk/paddles
 def test_running_status_with_waiting_and_running_jobs(self):
     self.app.post_json('/runs/', dict(name="foo"))
     self.app.post_json('/runs/foo/jobs/', dict(
         job_id=1,
         status="running",
     ))
     self.app.post_json('/runs/foo/jobs/', dict(
         job_id=2,
         status="waiting",
     ))
     new_run = Run.get(1)
     assert new_run.status == 'running'
예제 #5
0
파일: test_runs.py 프로젝트: ceph/paddles
 def test_running_status_with_waiting_and_running_jobs(self):
     self.app.post_json('/runs/', dict(name="foo"))
     self.app.post_json('/runs/foo/jobs/', dict(
         job_id=1,
         status="running",
     ))
     self.app.post_json('/runs/foo/jobs/', dict(
         job_id=2,
         status="waiting",
     ))
     new_run = Run.get(1)
     assert new_run.status == 'running'
예제 #6
0
파일: test_runs.py 프로젝트: kshtsk/paddles
 def test_create_new_run(self):
     self.app.post_json('/runs/', dict(name="foo"))
     new_run = Run.get(1)
     assert new_run.name == 'foo'
예제 #7
0
파일: test_runs.py 프로젝트: ceph/paddles
 def test_create_new_run(self):
     self.app.post_json('/runs/', dict(name="foo"))
     new_run = Run.get(1)
     assert new_run.name == 'foo'