Beispiel #1
0
def filter_count(request, values={}):
    """Performs a search and returns the resulting count of plans.

    :param dict values: a mapping containing criteria. See also
        :meth:`TestPlan.filter <tcms.xmlrpc.api.testplan.filter>`.
    :return: total matching plans.
    :rtype: int

    .. seealso:: See example of :meth:`TestPlan.filter <tcms.xmlrpc.api.testplan.filter>`.
    """
    return distinct_count(TestPlan, values)
Beispiel #2
0
def filter_count(request, values={}):
    """Performs a search and returns the resulting count of plans.

    :param dict values: a mapping containing criteria. See also
        :meth:`TestPlan.filter <tcms.xmlrpc.api.testplan.filter>`.
    :return: total matching plans.
    :rtype: int

    .. seealso:: See example of :meth:`TestPlan.filter <tcms.xmlrpc.api.testplan.filter>`.
    """
    return distinct_count(TestPlan, values)
Beispiel #3
0
def filter_count(values={}):
    """
    Description: Performs a search and returns the resulting count of plans.

    Params:      $values - Hash: keys must match valid search fields (see filter).

    Returns:     Integer - total matching plans.

    Example:
    # See distinct_count()
    """
    return distinct_count(TestPlan, values)
Beispiel #4
0
def filter_count(request, values={}):
    """
    Description: Performs a search and returns the resulting count of plans.

    Params:      $values - Hash: keys must match valid search fields (see filter).

    Returns:     Integer - total matching plans.

    Example:
    # See distinct_count()
    """
    return distinct_count(TestPlan, values)
Beispiel #5
0
def filter_count(request, values={}):
    """Performs a search and returns the resulting count of cases.

    :param dict values: a mapping containing criteria. See also
        :class:`TestCaseRun.filter <tcms.xmlrpc.api.testcaserun.filter>`.
    :return: total matching cases.
    :rtype: int

    .. seealso::
       See example in :class:`TestCaseRun.filter <tcms.xmlrpc.api.testcaserun.filter>`.
    """
    from tcms.testruns.models import TestCaseRun

    return distinct_count(TestCaseRun, values)
Beispiel #6
0
def filter_count(request, values={}):
    """
    Description: Performs a search and returns the resulting count of cases.

    Params:      $query - Hash: keys must match valid search fields (see filter).

    Returns:     Integer - total matching cases.

    Example:
    # See distinct_count()
    """
    from tcms.testruns.models import TestCaseRun

    return distinct_count(TestCaseRun, values)
Beispiel #7
0
def filter_count(request, values={}):
    """Performs a search and returns the resulting count of cases.

    :param dict values: a mapping containing criteria. See also
        :class:`TestCaseRun.filter <tcms.xmlrpc.api.testcaserun.filter>`.
    :return: total matching cases.
    :rtype: int

    .. seealso::
       See example in :class:`TestCaseRun.filter <tcms.xmlrpc.api.testcaserun.filter>`.
    """
    from tcms.testruns.models import TestCaseRun

    return distinct_count(TestCaseRun, values)
Beispiel #8
0
def filter_count(request, values={}):
    """
    Description: Performs a search and returns the resulting count of cases.

    Params:      $query - Hash: keys must match valid search fields (see filter).

    Returns:     Integer - total matching cases.

    Example:
    # See distinct_count()
    """
    from tcms.testruns.models import TestCaseRun

    return distinct_count(TestCaseRun, values)
Beispiel #9
0
def filter_count(request, values={}):
    """Performs a search and returns the resulting count of cases.

    :param dict values: a mapping containing same criteria with
        :meth:`TestCase.filter <tcms.xmlrpc.api.testcase.filter>`.
    :return: the number of matching cases.
    :rtype: int

    .. seealso:: Examples of :meth:`TestCase.filter <tcms.xmlrpc.api.testcase.filter>`.
    """

    if values.get('estimated_time'):
        values['estimated_time'] = timedelta2int(
            pre_process_estimated_time(values.get('estimated_time')))

    return distinct_count(TestCase, values)
Beispiel #10
0
def filter_count(request, values={}):
    """Performs a search and returns the resulting count of cases.

    :param dict values: a mapping containing same criteria with
        :meth:`TestCase.filter <tcms.xmlrpc.api.testcase.filter>`.
    :return: the number of matching cases.
    :rtype: int

    .. seealso:: Examples of :meth:`TestCase.filter <tcms.xmlrpc.api.testcase.filter>`.
    """

    if values.get('estimated_time'):
        values['estimated_time'] = timedelta2int(
            pre_process_estimated_time(values.get('estimated_time'))
        )

    return distinct_count(TestCase, values)
Beispiel #11
0
def filter_count(values={}):
    """
    Description: Performs a search and returns the resulting count of cases.

    Params:      $values - Hash: keys must match valid search fields (see filter).

    Returns:     Integer - total matching cases.

    Example:
    # See TestCase.filter()
    """

    if values.get('estimated_time'):
        values['estimated_time'] = timedelta2int(
            pre_process_estimated_time(values.get('estimated_time')))

    return distinct_count(TestCase, values)
Beispiel #12
0
def filter_count(request, values={}):
    """
    Description: Performs a search and returns the resulting count of cases.

    Params:      $values - Hash: keys must match valid search fields (see filter).

    Returns:     Integer - total matching cases.

    Example:
    # See TestCase.filter()
    """

    if values.get('estimated_time'):
        values['estimated_time'] = timedelta2int(
            pre_process_estimated_time(values.get('estimated_time'))
        )

    return distinct_count(TestCase, values)