mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
corresponding test for dict extra_vars bug
This commit is contained in:
parent
60cbc3cbbc
commit
f07cd69012
@ -65,6 +65,17 @@ def test_edit_sensitive_fields(patch, job_template_factory, alice, grant_project
|
||||
}, alice, expect=expect)
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_reject_dict_extra_vars_patch(patch, job_template_factory, admin_user):
|
||||
# Expect a string for extra_vars, raise 400 in this case that would
|
||||
# otherwise have been saved incorrectly
|
||||
jt = job_template_factory(
|
||||
'jt', organization='org1', project='prj', inventory='inv', credential='cred'
|
||||
).job_template
|
||||
patch(reverse('api:job_template_detail', args=(jt.id,)),
|
||||
{'extra_vars': {'foo': 5}}, admin_user, expect=400)
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_edit_playbook(patch, job_template_factory, alice):
|
||||
objs = job_template_factory('jt', organization='org1', project='prj', inventory='inv', credential='cred')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user