Merge pull request #2490 from AlanCoding/2413_allow_orphan_jobs

Allow launching an orphaned job
This commit is contained in:
Alan Rominger
2016-06-21 16:24:31 -04:00
committed by GitHub
3 changed files with 13 additions and 2 deletions

View File

@@ -35,3 +35,11 @@ def test_job_blocking_allow_simul(get, post, job_template, inventory):
job_template.allow_simultaneous = False
assert j1.is_blocked_by(j2)
assert j2.is_blocked_by(j1)
@pytest.mark.django_db
def test_orphan_unified_job_creation(instance, inventory):
job = Job.objects.create(job_template=None, inventory=inventory, name='hi world')
job2 = job.copy()
assert job2.job_template is None
assert job2.inventory == inventory
assert job2.name == 'hi world'