#NEWLINE# def test_language_en_us( self ) : #NEWLINE# #INDENT# form = SimpleSearchForm ( { #NEWLINE# #INDENT# 'q' : 'foo' , #NEWLINE# #UNINDENT# } ) #NEWLINE# ok_ ( form . is_valid ( ) ) #NEWLINE# s = generate_simple_search ( form , 'en-US' , with_highlights = False ) #NEWLINE# s_string = str ( s . build_search ( ) ) #NEWLINE# ok_ ( ( "{'term': {'document_locale': 'en-US'}}" in s_string ) ) #NEWLINE# ok_ ( ( "'analyzer': 'snowball-english-synonyms'" in s ) )