'Make sure we don\'t index redirects'

def test_wiki_redirects(self):

    doc = DocumentFactory(title=u'wool    hats')
    RevisionFactory(document=doc, is_approved=True)
    self.refresh()
    eq_(DocumentMappingType.search().query(document_title__match='wool').count(), 1)
    RedirectRevisionFactory(document=doc)
    self.refresh()
    eq_(DocumentMappingType.search().query(document_title__match='wool').count(), 0)
