From 89cbceeab88dad7b35f43f7b9c8c5f136e15b379 Mon Sep 17 00:00:00 2001 From: Aaron Tan Date: Tue, 20 Sep 2016 11:39:44 -0400 Subject: [PATCH] Functional test added. --- awx/main/tests/functional/api/test_role.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 awx/main/tests/functional/api/test_role.py diff --git a/awx/main/tests/functional/api/test_role.py b/awx/main/tests/functional/api/test_role.py new file mode 100644 index 0000000000..94215521a5 --- /dev/null +++ b/awx/main/tests/functional/api/test_role.py @@ -0,0 +1,13 @@ +import pytest + +from django.core.urlresolvers import reverse + +@pytest.mark.django_db +def test_admin_visible_to_orphaned_users(get, alice): + names = set() + + response = get(reverse('api:role_list'), user=alice) + for item in response.data['results']: + names.add(item['name']) + assert 'System Auditor' in names + assert 'System Administrator' in names