#NEWLINE# def test_get_with_exclude( self ) : #NEWLINE# #INDENT# with self . assertNumQueries ( 1 ) : #NEWLINE# #INDENT# response = self . client . get ( '/users/?exclude[]=name' ) #NEWLINE# #UNINDENT# query = connection . queries [ ( - 1 ) ] [ 'sql' ] #NEWLINE# self . assertFalse ( ( 'name' in query ) , query ) #NEWLINE# self . assertFalse ( ( '*' in query ) , response ) #NEWLINE# self . assertEquals ( 200 , response . status_code ) #NEWLINE# self . assertEquals ( { #NEWLINE# #INDENT# 'users' : [ { #NEWLINE# #INDENT# 'id' : 1 , #NEWLINE# 'location' : 1 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'id' : 2 , #NEWLINE# 'location' : 1 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'id' : 3 , #NEWLINE# 'location' : 2 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'id' : 4 , #NEWLINE# 'location' : 3 , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , json . loads ( response . content . decode ( 'utf-8' ) ) )