mirror of
https://github.com/ansible/awx.git
synced 2026-04-08 03:29:21 -02:30
add can_delete to inventory update access
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user