#NEWLINE# def test_match_gender( self ) : #NEWLINE# #INDENT# response = self . client . get ( reverse ( 'instructors' ) , { #NEWLINE# #INDENT# 'latitude' : 1 , #NEWLINE# 'longitude' : 1 , #NEWLINE# 'gender' : 'F' , #NEWLINE# 'submit' : 'Submit' , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( response . status_code == 200 ) #NEWLINE# content = response . content . decode ( 'utf-8' ) #NEWLINE# assert ( 'Hermione Granger' in content ) #NEWLINE# assert ( 'Harry Potter' not in content ) #NEWLINE# assert ( 'Ron Weasley' not in content ) #NEWLINE# response = self . client . get ( reverse ( 'instructors' ) , { #NEWLINE# #INDENT# 'latitude' : 1 , #NEWLINE# 'longitude' : 1 , #NEWLINE# 'gender' : 'M' , #NEWLINE# 'submit' : 'Submit' , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( response . status_code == 200 ) #NEWLINE# content = response . content . decode ( 'utf-8' ) #NEWLINE# assert ( 'Hermione Granger' not in content ) #NEWLINE# assert ( 'Harry Potter' in content ) #NEWLINE# assert ( 'Ron Weasley' in content )