#NEWLINE# def test_highlight_cumulative( self ) : #NEWLINE# #INDENT# 'Make sure highlighting fields are cumulative and none clears them.' #NEWLINE# s = self . get_s ( ) . query ( foo__match = 'car' ) . filter ( id = 5 ) . highlight ( ) #NEWLINE# eq_ ( list ( self ) [ 0 ] . es_meta . highlight , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# s = s . highlight ( 'foo' ) #NEWLINE# eq_ ( list ( s ) [ 0 ] . es_meta . highlight [ 'foo' ] , [ 'train <em>car</em>' ] ) #NEWLINE# s = s . highlight ( None ) #NEWLINE# eq_ ( list ( s ) [ 0 ] . es_meta . highlight , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } )