def list_attachments(plan_id, **kwargs): """ .. function:: XML-RPC TestPlan.list_attachments(plan_id) List attachments for the given TestPlan. :param plan_id: PK of TestPlan to inspect :type plan_id: int :return: A list containing information and download URLs for attachements :rtype: list :raises: TestPlan.DoesNotExit if object specified by PK is missing """ plan = TestPlan.objects.get(pk=plan_id) request = kwargs.get(REQUEST_KEY) return utils.get_attachments_for(request, plan)
def list_attachments(plan_id, **kwargs): """ .. function:: RPC TestPlan.list_attachments(plan_id) List attachments for the given TestPlan. :param plan_id: PK of TestPlan to inspect :type plan_id: int :param \\**kwargs: Dict providing access to the current request, protocol, entry point name and handler instance from the rpc method :return: A list containing information and download URLs for attachements :rtype: list :raises TestPlan.DoesNotExit: if object specified by PK is missing """ plan = TestPlan.objects.get(pk=plan_id) request = kwargs.get(REQUEST_KEY) return utils.get_attachments_for(request, plan)