#NEWLINE# def test_search( self ) : #NEWLINE# #INDENT# response = self . client . get ( ( reverse ( 'wagtailsearch_search' ) + '?q=Christmas' ) ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# self . assertTemplateUsed ( response , 'wagtailsearch/search_results.html' ) #NEWLINE# self . assertEqual ( response . context [ 'query_string' ] , 'Christmas' ) #NEWLINE# self . assertIsInstance ( response . context [ 'search_results' ] , paginator . Page ) #NEWLINE# search_results = response . context [ 'search_results' ] . object_list #NEWLINE# christmas_event_page = Page . objects . get ( url_path = '/home/events/christmas/' ) #NEWLINE# self . assertEqual ( list ( search_results ) , [ christmas_event_page ] ) #NEWLINE# self . assertIsInstance ( response . context [ 'query' ] , Query ) #NEWLINE# query = response . context [ 'query' ] #NEWLINE# self . assertEqual ( query . query_string , 'christmas' )