allow UJT content type list to come from cache

This commit is contained in:
AlanCoding
2017-02-17 22:06:34 -05:00
parent ea1a6d17b3
commit 757982088c
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:
'''