mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-13 06:58:37 -05:00
added Credential.migrate_to_rbac and tests
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import pytest
|
||||
|
||||
from awx.main.models.organization import Organization
|
||||
from awx.main.models.credential import Credential
|
||||
from awx.main.models.organization import (
|
||||
Organization,
|
||||
Team,
|
||||
)
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
@pytest.fixture
|
||||
@@ -14,10 +18,18 @@ def user():
|
||||
return user
|
||||
return u
|
||||
|
||||
@pytest.fixture
|
||||
def team(organization):
|
||||
return Team.objects.create(organization=organization, name='test-team')
|
||||
|
||||
@pytest.fixture
|
||||
def organization():
|
||||
return Organization.objects.create(name="test-org", description="test-org-desc")
|
||||
|
||||
@pytest.fixture
|
||||
def credential():
|
||||
return Credential.objects.create(kind='aws', name='test-cred')
|
||||
|
||||
@pytest.fixture
|
||||
def permissions():
|
||||
return {
|
||||
@@ -26,5 +38,8 @@ def permissions():
|
||||
|
||||
'auditor':{'read':True, 'create':False, 'write':False,
|
||||
'update':False, 'delete':False, 'scm_update':False, 'execute':False, 'use':False,},
|
||||
|
||||
'usage':{'read':False, 'create':False, 'write':False,
|
||||
'update':False, 'delete':False, 'scm_update':False, 'execute':False, 'use':True,},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user