add can_delete to inventory update access

This commit is contained in:
AlanCoding
2016-06-22 08:50:39 -04:00
parent e5be8d608b
commit 36513e96a2
3 changed files with 24 additions and 1 deletions

View File

@@ -29,6 +29,8 @@ from awx.main.models.jobs import JobTemplate
from awx.main.models.inventory import (
Group,
Inventory,
InventoryUpdate,
InventorySource
)
from awx.main.models.organization import (
Organization,
@@ -265,6 +267,15 @@ def hosts(group_factory):
def group(inventory):
return inventory.groups.create(name='single-group')
@pytest.fixture
def inventory_source(group, inventory):
return InventorySource.objects.create(name=group.name, group=group,
inventory=inventory, source='gce')
@pytest.fixture
def inventory_update(inventory_source):
return InventoryUpdate.objects.create(inventory_source=inventory_source)
@pytest.fixture
def host(group, inventory):
return group.hosts.create(name='single-host', inventory=inventory)