Exemplo n.º 1
0
 def to_xmlrpc(cls, query=None):
     """
     Convert the query set for XMLRPC
     """
     if query is None:
         query = {}
     serializer = XMLRPCSerializer(queryset=cls.objects.filter(**query))
     return serializer.serialize_queryset()
Exemplo n.º 2
0
def get_logs(case_run_id):
    """
    Description:  Get log links to TestCaseRun

    Params:     $case_run_id - Integer:
    """
    links = LinkReference.objects.filter(test_case_run=case_run_id)
    s = XMLRPCSerializer(links)
    return s.serialize_queryset()
Exemplo n.º 3
0
def get_logs(request, case_run_id):
    """
    Description:  Get log links to TestCaseRun

    Params:     $case_run_id - Integer:
    """
    test_case_run = TestCaseRun.objects.get(pk=case_run_id)
    links = LinkReference.get_from(test_case_run)
    s = XMLRPCSerializer(links)
    return s.serialize_queryset()
Exemplo n.º 4
0
def get_logs(request, case_run_id):
    """Get log links to TestCaseRun

    :param int case_run_id: case run ID.
    :return: list of mappings of found logs :class:`LinkReference`.
    :rtype: list[dict]
    """
    test_case_run = TestCaseRun.objects.get(pk=case_run_id)
    links = LinkReference.get_from(test_case_run)
    s = XMLRPCSerializer(links)
    return s.serialize_queryset()
Exemplo n.º 5
0
def get_logs(request, case_run_id):
    """Get log links to TestCaseRun

    :param int case_run_id: case run ID.
    :return: list of mappings of found logs :class:`LinkReference`.
    :rtype: list[dict]
    """
    test_case_run = TestCaseRun.objects.get(pk=case_run_id)
    links = LinkReference.get_from(test_case_run)
    s = XMLRPCSerializer(links)
    return s.serialize_queryset()
Exemplo n.º 6
0
def get_logs(case_run_id):
    """
    .. function:: XML-RPC TestCaseRun.get_logs(case_run_id)

        Get log links for the specified TestCaseRun

        :param case_run_id: PK of TestCaseRun object
        :type case_run_id: int
        :return: Serialized list of :class:`tcms.core.contrib.linkreference.models.LinkReference`
                 objects
    """
    links = LinkReference.objects.filter(test_case_run=case_run_id)
    serialier = XMLRPCSerializer(links)
    return serialier.serialize_queryset()
Exemplo n.º 7
0
def get_logs(request, case_run_id):
    """
    Description:  Get log links to TestCaseRun

    Params:     $case_run_id - Integer:
    """
    try:
        test_case_run = TestCaseRun.objects.get(pk=case_run_id)
    except ObjectDoesNotExist:
        raise

    links = LinkReference.get_from(test_case_run)
    s = XMLRPCSerializer(links)
    return s.serialize_queryset()
Exemplo n.º 8
0
def get_links(query):
    """
    .. function:: XML-RPC TestExecution.get_links(query)

        Get URL links for the specified TestExecution

        :param query: Field lookups for
                      :class:`tcms.core.contrib.linkreference.models.LinkReference`
        :type query: dict
        :return: Serialized list of :class:`tcms.core.contrib.linkreference.models.LinkReference`
                 objects
    """
    links = LinkReference.objects.filter(**query)
    serialier = XMLRPCSerializer(links)
    return serialier.serialize_queryset()
Exemplo n.º 9
0
 def to_xmlrpc(cls, query={}):
     """
     Convert the query set for XMLRPC
     """
     s = XMLRPCSerializer(queryset=cls.objects.filter(**query).order_by('pk'))
     return s.serialize_queryset()
Exemplo n.º 10
0
 def to_xmlrpc(cls, query={}):
     """
     Convert the query set for XMLRPC
     """
     s = XMLRPCSerializer(queryset=cls.objects.filter(**query))
     return s.serialize_queryset()