#NEWLINE# def test_replaces_words_with_highlighted_word( self ) : #NEWLINE# #INDENT# text = 'This is some text' #NEWLINE# ( request , context ) = generate_random_request_and_context ( text ) #NEWLINE# node = text_helpers . HighlightedSearchTermNode ( 'text' ) #NEWLINE# result = node . render ( context ) #NEWLINE# expected = 'This is <span class="search_term">some</span> text' #NEWLINE# self . assertEqual ( expected , result )