Beispiel #1
0
 def to_xmlrpc(cls, query=None):
     """
     Convert the query set for XMLRPC
     """
     if query is None:
         query = {}
     serializer = Serializer(queryset=cls.objects.filter(**query))
     return serializer.serialize_queryset()
Beispiel #2
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 = Serializer(links)
    return serialier.serialize_queryset()