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