Exemplo n.º 1
0
    def tearDown(self):
        for o in Webapp.objects.all():
            o.delete()
        for o in Extension.objects.all():
            o.delete()
        super(TestMultiSearchView, self).tearDown()

        # Make sure to delete and unindex *all* things. Normally we wouldn't
        # care about stray deleted content staying in the index, but they can
        # have an impact on relevancy scoring so we need to make sure. This
        # needs to happen after super() has been called since it'll process the
        # indexing tasks that should happen post_request, and we need to wait
        # for ES to have done everything before continuing.
        Webapp.get_indexer().unindexer(_all=True)
        Extension.get_indexer().unindexer(_all=True)
        HomescreenIndexer.unindexer(_all=True)
        self.refresh(('webapp', 'extension', 'homescreen'))
Exemplo n.º 2
0
 def tearDown(self):
     Extension.get_indexer().unindexer(_all=True)
     super(TestExtensionSearchView, self).tearDown()
Exemplo n.º 3
0
 def setUp(self):
     self.indexer = Extension.get_indexer()()