Exemple #1
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'
Exemple #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'
Exemple #3
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)
Exemple #4
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'
Exemple #5
0
 def test_basic_creation(self):
     new_run = Run('test_basic_creation')
     Job({}, new_run)
     models.commit()
     assert Job.get(1)
Exemple #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)
Exemple #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'
Exemple #8
0
 def test_basic_creation(self):
     new_run = Run('test_basic_creation')
     Job({}, new_run)
     models.commit()
     assert Job.get(1)