#NEWLINE# def test_query( self ) : #NEWLINE# #INDENT# 'Test searching.' #NEWLINE# user = self . create_superuser ( ) #NEWLINE# find_me = Invite . objects . create ( email = 'hi@dj.local' , created_by = user ) #NEWLINE# dont_find_me = Invite . objects . create ( email = 'bye@dj.local' , created_by = user ) #NEWLINE# self . client . login ( username = user . email , password = 'moo' ) #NEWLINE# response = self . client . get ( reverse ( 'invites' ) , { #NEWLINE# #INDENT# 'q' : 'hi' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertIn ( find_me , find_me . context [ 'invites' ] ) #NEWLINE# self . assertNotIn ( dont_find_me , response . context [ 'invites' ] )