Merge pull request #5445 from AlanCoding/sub_ct_from_cache

Allow UJT content type list to come from manager cache
This commit is contained in:
Alan Rominger
2017-02-21 10:33:21 -05:00
committed by GitHub
2 changed files with 24 additions and 6 deletions

View File

@@ -1,5 +1,20 @@
import pytest
# Django
from django.contrib.contenttypes.models import ContentType
# AWX
from awx.main.models import UnifiedJobTemplate, JobTemplate, WorkflowJobTemplate, Project
@pytest.mark.django_db
def test_subclass_types(rando):
assert set(UnifiedJobTemplate._submodels_with_roles()) == set([
ContentType.objects.get_for_model(JobTemplate).id,
ContentType.objects.get_for_model(Project).id,
ContentType.objects.get_for_model(WorkflowJobTemplate).id
])
class TestCreateUnifiedJob:
'''