Ejemplo n.º 1
0
def facet(request, template='facet.html'):
    context = {}
    context['analysis_types'] = []
    _type = request.GET.get('search_type', 'yara')
    try:
        context['analysis_types'].append(facet_search(_type))
    except Exception, ex:
        print "Exception",ex,traceback.format_exc()
        context['analysis_types'] = []
        context['error'] = ex
Ejemplo n.º 2
0
def facet(request, template='facet.html'):
    context = {}
    context['analysis_types'] = []
    _type = request.GET.get('search_type', 'yara')
    try:
        context['analysis_types'].append(facet_search(_type))
    except Exception, ex:
        print "Exception", ex, traceback.format_exc()
        context['analysis_types'] = []
        context['error'] = ex
Ejemplo n.º 3
0
 def testFacet(self):
     #"""Tests the facets results"""
     analysis = query.facet_search("clamav")
     self.assertEquals(len(analysis.facets), 1)
     for facet in analysis.facets:
         self.failUnless(len(facet.results),0)