Пример #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'
Пример #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
 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
 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
 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)