introduce summary_fields for users, showing user_capabilities

This commit is contained in:
AlanCoding
2016-08-30 14:02:57 -04:00
parent 0151967e9c
commit a32dd5b535
3 changed files with 15 additions and 7 deletions

View File

@@ -11,7 +11,6 @@ def test_inventory_group_host_can_add(inventory, alice, options):
response = options(reverse('api:inventory_groups_list', args=[inventory.pk]), alice)
assert 'POST' in response.data['actions']
@pytest.mark.django_db
def test_inventory_group_host_can_not_add(inventory, bob, options):
inventory.read_role.members.add(bob)
@@ -20,3 +19,13 @@ def test_inventory_group_host_can_not_add(inventory, bob, options):
assert 'POST' not in response.data['actions']
response = options(reverse('api:inventory_groups_list', args=[inventory.pk]), bob)
assert 'POST' not in response.data['actions']
@pytest.mark.django_db
def test_user_list_can_add(org_member, org_admin, options):
response = options(reverse('api:user_list'), org_admin)
assert 'POST' in response.data['actions']
@pytest.mark.django_db
def test_user_list_can_not_add(org_member, org_admin, options):
response = options(reverse('api:user_list'), org_member)
assert 'POST' not in response.data['actions']