mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-14 20:11:48 -05:00
add unit tests
This commit is contained in:
@@ -2614,6 +2614,20 @@ class JobTemplateObjectRolesList(SubListAPIView):
|
||||
content_type = ContentType.objects.get_for_model(self.parent_model)
|
||||
return Role.objects.filter(content_type=content_type, object_id=po.pk)
|
||||
|
||||
# TODO:
|
||||
class WorkflowJobNodeList(ListCreateAPIView):
|
||||
|
||||
model = WorkflowJobNode
|
||||
serializer_class = WorkflowJobNodeListSerializer
|
||||
new_in_310 = True
|
||||
|
||||
# TODO:
|
||||
class WorkflowJobNodeDetail(RetrieveUpdateDestroyAPIView):
|
||||
|
||||
model = WorkflowJobNode
|
||||
serializer_class = WorkflowJobNodeDetailSerializer
|
||||
new_in_310 = True
|
||||
|
||||
# TODO:
|
||||
class WorkflowJobTemplateNodeList(ListCreateAPIView):
|
||||
|
||||
@@ -2628,6 +2642,7 @@ class WorkflowJobTemplateNodeDetail(RetrieveUpdateDestroyAPIView):
|
||||
serializer_class = WorkflowJobTemplateNodeDetailSerializer
|
||||
new_in_310 = True
|
||||
|
||||
|
||||
class WorkflowJobTemplateNodeChildrenBaseList(EnforceParentRelationshipMixin, SubListCreateAttachDetachAPIView):
|
||||
|
||||
model = WorkflowJobTemplateNode
|
||||
@@ -2656,19 +2671,20 @@ class WorkflowJobTemplateNodeFailureNodesList(WorkflowJobTemplateNodeChildrenBas
|
||||
class WorkflowJobTemplateNodeAlwaysNodesList(WorkflowJobTemplateNodeChildrenBaseList):
|
||||
relationship = 'always_nodes'
|
||||
|
||||
'''
|
||||
class WorkflowJobNodeChildrenBaseList(EnforceParentRelationshipMixin, SubListCreateAttachDetachAPIView):
|
||||
class WorkflowJobNodeChildrenBaseList(SubListAPIView):
|
||||
|
||||
model = WorkflowJobNode
|
||||
serializer_class = WorkflowJobNodeListSerializer
|
||||
always_allow_superuser = True # TODO: RBAC
|
||||
parent_model = WorkflowJobTemplateNode
|
||||
parent_model = Job
|
||||
relationship = ''
|
||||
'''
|
||||
enforce_parent_relationship = 'workflow_job_template'
|
||||
new_in_310 = True
|
||||
'''
|
||||
|
||||
#
|
||||
#Limit the set of WorkflowJobTemplateNodes to the related nodes of specified by
|
||||
#Limit the set of WorkflowJobeNodes to the related nodes of specified by
|
||||
#'relationship'
|
||||
#
|
||||
def get_queryset(self):
|
||||
@@ -2684,7 +2700,6 @@ class WorkflowJobNodeFailureNodesList(WorkflowJobNodeChildrenBaseList):
|
||||
|
||||
class WorkflowJobNodeAlwaysNodesList(WorkflowJobNodeChildrenBaseList):
|
||||
relationship = 'always_nodes'
|
||||
'''
|
||||
|
||||
|
||||
# TODO:
|
||||
|
||||
Reference in New Issue
Block a user