mirror of
https://github.com/ansible/awx.git
synced 2026-04-09 20:19:21 -02:30
correct error in workflow unit tests
This commit is contained in:
@@ -2267,7 +2267,6 @@ class WorkflowNodeBaseSerializer(BaseSerializer):
|
|||||||
|
|
||||||
def validate(self, attrs):
|
def validate(self, attrs):
|
||||||
# char_prompts go through different validation, so remove them here
|
# char_prompts go through different validation, so remove them here
|
||||||
print ' attrs: ' + str(attrs)
|
|
||||||
for fd in ['job_type', 'job_tags', 'skip_tags', 'limit']:
|
for fd in ['job_type', 'job_tags', 'skip_tags', 'limit']:
|
||||||
if fd in attrs:
|
if fd in attrs:
|
||||||
attrs.pop(fd)
|
attrs.pop(fd)
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ class TestWorkflowWarnings:
|
|||||||
|
|
||||||
def test_warn_scan_errors_node_prompts(self, job_node_with_prompts):
|
def test_warn_scan_errors_node_prompts(self, job_node_with_prompts):
|
||||||
job_node_with_prompts.unified_job_template.job_type = 'scan'
|
job_node_with_prompts.unified_job_template.job_type = 'scan'
|
||||||
job_node_with_prompts.job_type = 'run'
|
job_node_with_prompts.char_prompts['job_type'] = 'run'
|
||||||
job_node_with_prompts.inventory = Inventory(name='different-inventory', pk=23)
|
job_node_with_prompts.inventory = Inventory(name='different-inventory', pk=23)
|
||||||
assert 'ignored' in job_node_with_prompts.get_prompts_warnings()
|
assert 'ignored' in job_node_with_prompts.get_prompts_warnings()
|
||||||
assert 'job_type' in job_node_with_prompts.get_prompts_warnings()['ignored']
|
assert 'job_type' in job_node_with_prompts.get_prompts_warnings()['ignored']
|
||||||
|
|||||||
Reference in New Issue
Block a user