added Group.parents rebuilding

This commit is contained in:
Wayne Witzel III
2016-02-10 15:13:24 -05:00
parent 020fda658a
commit 6877a7a566
5 changed files with 71 additions and 7 deletions
+10 -1
View File
@@ -1,7 +1,10 @@
import pytest
from awx.main.models.credential import Credential
from awx.main.models.inventory import Inventory
from awx.main.models.inventory import (
Inventory,
Group,
)
from awx.main.models.projects import Project
from awx.main.models.organization import (
Organization,
@@ -45,6 +48,12 @@ def credential():
def inventory(organization):
return Inventory.objects.create(name="test-inventory", organization=organization)
@pytest.fixture
def group(inventory):
def g(name):
return Group.objects.create(inventory=inventory, name=name)
return g
@pytest.fixture
def permissions():
return {