mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
Update test to reflect needing job_template_admin_role
This commit is contained in:
parent
2f78c658b1
commit
70a97ce998
@ -81,11 +81,14 @@ def test_job_template_access_use_level(jt_linked, rando):
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.parametrize("role_names", [("admin_role",), ("inventory_admin_role", "project_admin_role")])
|
||||
@pytest.mark.parametrize("role_names", [("admin_role",), ("job_template_admin_role", "inventory_admin_role", "project_admin_role")])
|
||||
def test_job_template_access_admin(role_names, jt_linked, rando):
|
||||
access = JobTemplateAccess(rando)
|
||||
# Appoint this user as admin of the organization
|
||||
#jt_linked.inventory.organization.admin_role.members.add(rando)
|
||||
assert not access.can_read(jt_linked)
|
||||
assert not access.can_delete(jt_linked)
|
||||
|
||||
for role_name in role_names:
|
||||
role = getattr(jt_linked.inventory.organization, role_name)
|
||||
role.members.add(rando)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user