mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 07:26:03 -03:30
Addd inventory fixture
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from awx.main.models.credential import Credential
|
from awx.main.models.credential import Credential
|
||||||
|
from awx.main.models.inventory import Inventory
|
||||||
from awx.main.models.organization import (
|
from awx.main.models.organization import (
|
||||||
Organization,
|
Organization,
|
||||||
|
Permission,
|
||||||
Team,
|
Team,
|
||||||
)
|
)
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
@@ -30,6 +32,10 @@ def organization():
|
|||||||
def credential():
|
def credential():
|
||||||
return Credential.objects.create(kind='aws', name='test-cred')
|
return Credential.objects.create(kind='aws', name='test-cred')
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def inventory(organization):
|
||||||
|
return Inventory.objects.create(name="test-inventory", organization=organization)
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def permissions():
|
def permissions():
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user