def new_job_with_task(new_user, new_task): new_user.save() job = Job(name='job_name', description='testDescription', user_id=new_user.id, _status=JobStatus.not_running) job.save() job.add_task(new_task) return job
def new_admin_job(new_user, new_admin, new_task): new_user.save() new_admin.save() job = Job(name='admin_job', description='Admin is the owner of this job', user_id=new_admin.id, _status=JobStatus.not_running) job.save() job.add_task(new_task) return job