コード例 #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)
コード例 #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)
コード例 #3
0
ファイル: testplan.py プロジェクト: jetlyb/Kiwi
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)
コード例 #4
0
ファイル: testplan.py プロジェクト: MrSenko/Nitrate
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)
コード例 #5
0
ファイル: testcaserun.py プロジェクト: zumbi/Nitrate
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)
コード例 #6
0
ファイル: testcaserun.py プロジェクト: zhangqiusheng/Nitrate
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)
コード例 #7
0
ファイル: testcaserun.py プロジェクト: tkdchen/Nitrate
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)
コード例 #8
0
ファイル: testcaserun.py プロジェクト: Aaln1986/Nitrate
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)
コード例 #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)
コード例 #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)
コード例 #11
0
ファイル: testcase.py プロジェクト: jetlyb/Kiwi
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)
コード例 #12
0
ファイル: testcase.py プロジェクト: Aaln1986/Nitrate
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)