mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-04 16:01:51 -05:00
add mk_job to factories, use with survey passwords
This commit is contained in:
@@ -25,3 +25,17 @@ def notification_template_factory():
|
||||
def survey_spec_factory():
|
||||
return create_survey_spec
|
||||
|
||||
@pytest.fixture
|
||||
def job_with_secret_key_factory(job_template_factory):
|
||||
def rf(persisted):
|
||||
"Returns job with linked JT survey with password survey questions"
|
||||
objects = job_template_factory('jt', organization='org1', survey=[
|
||||
{'variable': 'submitter_email', 'type': 'text', 'default': 'foobar@redhat.com'},
|
||||
{'variable': 'secret_key', 'default': '6kQngg3h8lgiSTvIEb21', 'type': 'password'},
|
||||
{'variable': 'SSN', 'type': 'password'}], jobs=[1], persisted=persisted)
|
||||
return objects.jobs[1]
|
||||
return rf
|
||||
|
||||
@pytest.fixture
|
||||
def job_with_secret_key_unit(job_with_secret_key_factory):
|
||||
return job_with_secret_key_factory(persisted=False)
|
||||
|
||||
Reference in New Issue
Block a user