'Test advanced search query filter.'

def test_advanced_search_query(self):

    doc = Document.objects.get(pk=1)
    doc.rendered_html = '<html><body    class="eval">foo()</body></html>'
    doc.save()
    render_done.send(sender=Document, instance=doc)
    self.refresh()
    class View(SearchView, ):
        filter_backends = (AdvancedSearchQueryBackend,)
    view = View.as_view()
    request = self.get_request('/en-US/search?css_classnames=eval')
    response = view(request)
    eq_(response.data['count'], 1)
    eq_(len(response.data['documents']), 1)
    eq_(response.data['documents'][0]['slug'], doc.slug)
    eq_(response.data['documents'][0]['locale'], doc.locale)
