From 4d3d38c4ac4f473fbaf0e0ea3ae50fa8dfc5229e Mon Sep 17 00:00:00 2001 From: Wayne Witzel III Date: Tue, 28 Jun 2016 10:56:36 -0400 Subject: [PATCH] ensure read_role is not being returned --- awx/main/tests/functional/api/test_team.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 awx/main/tests/functional/api/test_team.py diff --git a/awx/main/tests/functional/api/test_team.py b/awx/main/tests/functional/api/test_team.py new file mode 100644 index 0000000000..671b664663 --- /dev/null +++ b/awx/main/tests/functional/api/test_team.py @@ -0,0 +1,11 @@ +import pytest + +from django.core.urlresolvers import reverse + +@pytest.mark.django_db +def test_team_role_list_no_read_role(organization_factory, admin, get): + objects = organization_factory("test_org", teams=["test_team"]) + response = get(reverse('api:team_roles_list', args=(objects.teams.test_team.pk,)), admin) + + assert response.status_code == 200 + assert response.data['results'] == []