def test_add_and_delete(self):
        doc = DocumentFactory()
        RevisionFactory(document=doc, is_approved=True)
        self.refresh()
        eq_(DocumentMappingType.search().count(), 1)

        doc.delete()
        self.refresh()
        eq_(DocumentMappingType.search().count(), 0)
Adding a doc should add it to the search index; deleting should
dataset/ETHPy150Open mozilla/kitsune/kitsune/wiki/tests/test_es.py/DocumentUpdateTests.test_add_and_delete