Ejemplo n.º 1
0
    GroupFilter(),
    filters.String('bug_indices', 'issue'),
    filters.String('platform', 'platform'),
    filters.String('impact_stable_version_indices', 'stable'),
    filters.String('impact_beta_version_indices', 'beta'),
    filters.String('fuzzer_name_indices', 'fuzzer'),
    filters.String('job_type', 'job'),
]

FILTERS = [
    filters.String('impact_version_indices', 'impact'),
    filters.Boolean('has_bug_flag', 'issue'),
    filters.Boolean('open', 'open'),
    filters.Boolean('security_flag', 'security'),
    filters.Keyword(KEYWORD_FILTERS, 'keywords', 'q'),
    filters.NegativeBoolean('one_time_crasher_flag', 'reproducible'),
    filters.String('job_type', 'job'),
    filters.String('fuzzer_name_indices', 'fuzzer'),
    filters.String('project_name', 'project'),
    filters.Int('crash_revision', 'revision_greater_than', operator='>')
]


def add_filters(query, params):
    """Add filters based on params."""
    if not filters.has_params(params, FILTERS) and not params.get('showall'):
        params['open'] = 'yes'

    query.filter('status', 'Processed')
    query.filter('is_a_duplicate_flag', False)
Ejemplo n.º 2
0
 def setUp(self):
     self.filter = filters.NegativeBoolean('field', 'param')
     self.query = mock.Mock()