mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 05:59:28 -02:30
exercise role signal for job_template type
This commit is contained in:
18
awx/main/tests/functional/api/test_job_template.py
Normal file
18
awx/main/tests/functional/api/test_job_template.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import pytest
|
||||||
|
|
||||||
|
from django.core.urlresolvers import reverse
|
||||||
|
|
||||||
|
@pytest.mark.django_db
|
||||||
|
def test_job_template_role_user(post, organization_factory, job_template_factory):
|
||||||
|
objects = organization_factory("org",
|
||||||
|
superusers=['admin'],
|
||||||
|
users=['test'])
|
||||||
|
|
||||||
|
jt_objects = job_template_factory("jt",
|
||||||
|
organization=objects.organization,
|
||||||
|
inventory='test_inv',
|
||||||
|
project='test_proj')
|
||||||
|
|
||||||
|
url = reverse('api:user_roles_list', args=(objects.users.test.pk,))
|
||||||
|
response = post(url, dict(id=jt_objects.job_template.execute_role.pk), objects.superusers.admin)
|
||||||
|
assert response.status_code == 204
|
||||||
Reference in New Issue
Block a user