#NEWLINE# def test_locale_filter_works_for_documents( self ) : #NEWLINE# #INDENT# d1 = self . _make_document ( slug = 'right-doc' , locale = 'fr' ) #NEWLINE# self . _make_document ( slug = 'wrong-doc' , locale = 'en-US' ) #NEWLINE# self . refresh ( ) #NEWLINE# req = self . client . get ( reverse ( 'search.suggest' ) , { #NEWLINE# #INDENT# 'q' : 'emails' , #NEWLINE# 'locale' : 'fr' , #NEWLINE# #UNINDENT# } ) #NEWLINE# eq_ ( [ d [ 'slug' ] for d in req . data [ 'documents' ] ] , [ d1 . slug ] )