#NEWLINE# def test_wiki_keywords( self ) : #NEWLINE# #INDENT# 'Make sure updating keywords updates the index.' #NEWLINE# doc = DocumentFactory ( title = 'wool hats' ) #NEWLINE# RevisionFactory ( document = self , is_approved = True ) #NEWLINE# self . refresh ( ) #NEWLINE# eq_ ( DocumentMappingType . search ( ) . query ( document_keywords = 'wool' ) . count ( ) , 0 ) #NEWLINE# RevisionFactory ( document = doc , is_approved = True , keywords = 'wool' ) #NEWLINE# self . refresh ( ) #NEWLINE# eq_ ( DocumentMappingType . search ( ) . query ( document_keywords = 'wool' ) . count ( ) , 1 )