Project migration and tests

This commit is contained in:
Akita Noek
2016-02-08 22:49:10 -05:00
parent d51447e158
commit 34067d9c0e
4 changed files with 137 additions and 3 deletions
+10
View File
@@ -2,6 +2,7 @@ import pytest
from awx.main.models.credential import Credential
from awx.main.models.inventory import Inventory
from awx.main.models.projects import Project
from awx.main.models.organization import (
Organization,
Team,
@@ -23,6 +24,15 @@ def user():
def team(organization):
return Team.objects.create(organization=organization, name='test-team')
@pytest.fixture
def project(organization):
return Project.objects.create(name="test-project", organization=organization, description="test-project-desc")
@pytest.fixture
def user_project(user):
owner = user('owner')
return Project.objects.create(name="test-user-project", created_by=owner, description="test-user-project-desc")
@pytest.fixture
def organization():
return Organization.objects.create(name="test-org", description="test-org-desc")