'Adding a doc should add it to the search index; deleting should
delete it.'

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)
