示例#1
0
文件: test_runs.py 项目: ceph/paddles
 def test_create_new_job(self):
     self.app.post_json('/runs/', dict(name="foo"))
     self.app.post_json('/runs/foo/jobs/', dict(
         job_id=1,
     ))
     new_job = Job.get(1)
     assert new_job.job_id == '1'
示例#2
0
 def test_create_new_job(self):
     self.app.post_json('/runs/', dict(name="foo"))
     self.app.post_json('/runs/foo/jobs/', dict(job_id=1, ))
     new_job = Job.get(1)
     assert new_job.job_id == '1'
示例#3
0
文件: test_jobs.py 项目: ceph/paddles
 def test_job_updated(self):
     new_run = Run('test_job_updated')
     Job({}, new_run)
     models.commit()
     new_job = Job.get(1)
     assert isinstance(new_job.updated, datetime)
示例#4
0
文件: test_jobs.py 项目: ceph/paddles
 def test_relationship_works(self):
     new_run = Run('test_relationship_works')
     id_ = Job({}, new_run).id
     models.commit()
     new_job = Job.get(id_)
     assert new_job.run.name == 'test_relationship_works'
示例#5
0
文件: test_jobs.py 项目: ceph/paddles
 def test_basic_creation(self):
     new_run = Run('test_basic_creation')
     Job({}, new_run)
     models.commit()
     assert Job.get(1)
示例#6
0
 def test_job_updated(self):
     new_run = Run('test_job_updated')
     Job({}, new_run)
     models.commit()
     new_job = Job.get(1)
     assert isinstance(new_job.updated, datetime)
示例#7
0
 def test_relationship_works(self):
     new_run = Run('test_relationship_works')
     id_ = Job({}, new_run).id
     models.commit()
     new_job = Job.get(id_)
     assert new_job.run.name == 'test_relationship_works'
示例#8
0
 def test_basic_creation(self):
     new_run = Run('test_basic_creation')
     Job({}, new_run)
     models.commit()
     assert Job.get(1)